Click here to Skip to main content
16,019,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use the below mentioned code for Connecting vb6 with ms access
but when i run the project it displays the Compile error which is( User Defined type not defined) and highlight this line ( Conn As ADODB.Connection )
Pls solve this problem


Global Conn As ADODB.Connection
Global rs As ADODB.Recordset

Sub Access_Connector()
Set Conn = New ADODB.Connection
Conn.Provider = "microsoft.jet.oledb.4.0"
Conn.CursorLocation = adUseClient
Conn.Open App.Path & "\SIS.mdb"
End Sub
Posted

1 solution

You need to add the reference for ADODB. See this tutorial, explained all things clearly.

Visual Basic 6 & ADO Tutorial[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900