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?
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?