🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by luca Fri, 24 Aug 2007 17:58
thread
#102
Author: luca
Date: Fri, 24 Aug 2007 17:58
8 lines
1077 bytes
calling ADOConnection1->Open(); inside a thread I get this error message: 
"CoInitialize has not been called"

ADOConnection1 is in a DataModule.

which can be the problem?

luca 
Re: thread
#103
Author: Clayton Arends
Date: Fri, 24 Aug 2007 18:22
7 lines
1305 bytes
You need to call CoInitialize() in the thread's execute method and call 
CoUninitialize() at the end.  Also, keep in mind that TADOConnection is not 
thread-safe.  If at all possible you should create and destroy the ADO 
Connection in your thread's Execute method as well to avoid scenarios where 
multiple threads attempt to use the connection at the same time.

- Clayton 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads