Re: ADO + CoInitialize in threads? Mystery...
From: Bas van Beek (bas-no_at_spam-please.nl)
Date: 02/24/05
- Next message: Patrick: "Re: Could not convert variant of type (Null) into type (String)"
- Previous message: zorba: "Could not convert variant of type (Null) into type (String)"
- In reply to: Kjell Rilbe: "Re: ADO + CoInitialize in threads? Mystery..."
- Next in thread: Rob Roberts: "Re: ADO + CoInitialize in threads? Mystery..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Feb 2005 21:06:56 +0100
Kjell Rilbe wrote:
> OK. I kind of do both. :-) This is a DataModule with at least one
> TADOConnection and at least one TADODataSet dropped on the "form" at
> designtime. But the objects I'm using in the thread are created at
> runtime, within the thread.
>
> So then what? :-)
CoInitialize initializes the COM library for use by the calling thread.
Since you spawn new threads and create new ADO objects there, It would
be best to call it before creating the ADO objects.
Bas
- Next message: Patrick: "Re: Could not convert variant of type (Null) into type (String)"
- Previous message: zorba: "Could not convert variant of type (Null) into type (String)"
- In reply to: Kjell Rilbe: "Re: ADO + CoInitialize in threads? Mystery..."
- Next in thread: Rob Roberts: "Re: ADO + CoInitialize in threads? Mystery..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]