Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX component can't create object/return reference

Status
Not open for further replies.

seosamh

Programmer
Aug 2, 2000
29
IE
I am trying to run some VB5 code (sqlserver 6.5), however I am unable to connect to the database through the code, getting 'ActiveX component can't create object/return reference' error.

I am using the following:
Option Explicit
Const ccCDataObjects = "CDataObjects.CLS"

Private WithEvents c_eng As rdoEngine

'Database
Private c_env As rdoEnvironment
'Connection
Private c_con As rdoConnection

Dim er As rdoError

.......


Private Sub Class_Initialize()

Dim lt_ErrorType As gt_ErrorType

On Error GoTo cInitErrHand

Set c_eng = rdoEngine

Set c_env = rdoEnvironments(0)

c_env.CursorDriver = rdUseOdbc


The code gets as far as 'Set c_eng = rdoEngine' but can't proceed. I have made sure that my msrdo20.dll has the correct date, is registered etc, the ODBC is operating correctly, the regedit is correct.

What do I do?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top