Hello All,
Below is VB code I am using to open an ODBC connection.
I have created a DSN called Patent.
when i run this code i get the following error.
Compile error:
User-defined type not defined
the compile high lite the following line which has the error.
Set dbConn = New ADODB.Connection
can someone help please.
thanks
Private Sub Command1_Click()
Dim buffer As String
On Error GoTo err_openDB
Set dbConn = New ADODB.Connection
dbConn.open "DSN=Patent"
runSql "Set autocommit =0"
Exit Sub
err_openDB
MsgBox "Error opening Database" & Err.Description
Err.Raise Err.Number
Exit Sub
End Sub
Below is VB code I am using to open an ODBC connection.
I have created a DSN called Patent.
when i run this code i get the following error.
Compile error:
User-defined type not defined
the compile high lite the following line which has the error.
Set dbConn = New ADODB.Connection
can someone help please.
thanks
Private Sub Command1_Click()
Dim buffer As String
On Error GoTo err_openDB
Set dbConn = New ADODB.Connection
dbConn.open "DSN=Patent"
runSql "Set autocommit =0"
Exit Sub
err_openDB
MsgBox "Error opening Database" & Err.Description
Err.Raise Err.Number
Exit Sub
End Sub