New ADODB.Connection - 'CoInitialize has not been called'

Ronnie101

New member
Local time
Today, 03:52
Joined
Jun 29, 2007
Messages
7
I'm accessing an Access 2000 backend MDB via VB6.0 (SP6).

When I run it in the VB interpreter it runs fine.

When I run it as compiled native code I get an "Automation error: CoInitialize has not been called" error at this line:-

Set gobjConnection = New ADODB.Connection

I've tried prefacing it with either or both of these lines but it makes no difference.

If gobjConnection Is Nothing Then
y = Coinitialize(X) 'Declaration elsewhere in prog

Does anyone know why this is? Is it caused by a particular service pack or registry setting?
 

Users who are viewing this thread

Back
Top Bottom