ADO in a console? ADO in a service?

ADO in a console? ADO in a service?

Post by Philippe A » Sat, 27 Nov 2004 00:50:58


Dear All,

Is it possible to reliably run ADO operations from applications
running without a win message pump, such as

- a console?
- a service?

Are there limitations, pitfalls and/or funny behaviors to be aware of?

TIA,

Philippe
 
 
 

ADO in a console? ADO in a service?

Post by Philippe A » Sat, 27 Nov 2004 22:29:11

Thanks, Brian.


That doesn't seem to be too hard :-)

Does CoInitialize need to be called before the ADO components are even
created (i.e. before I create the containing datamodule)? /Ph.



On Thu, 25 Nov 2004 20:40:57 -0600, Brian Bushay TeamB

 
 
 

ADO in a console? ADO in a service?

Post by danny heij » Sun, 28 Nov 2004 05:24:08

> Does CoInitialize need to be called before the ADO components are even

Yes.

Also note that in a multithreaded service you have to do this for every
thread, and you have to use the components only in the thread that
instantiates them.

Danny
---
 
 
 

ADO in a console? ADO in a service?

Post by danny heij » Sun, 28 Nov 2004 05:24:08

> Does CoInitialize need to be called before the ADO components are even

Yes.

Also note that in a multithreaded service you have to do this for every
thread, and you have to use the components only in the thread that
instantiates them.

Danny
---
 
 
 

ADO in a console? ADO in a service?

Post by Philippe A » Tue, 30 Nov 2004 21:32:01

Brian and Danny,

That's quite clear. Thanks to both! /Ph.


On Fri, 26 Nov 2004 17:14:19 -0600, Brian Bushay TeamB