Hello,
For good all times try this code.
Private connection As ADODB.Connection
Private recordset As ADODB.Recordset
Private Sub Form_Load()
Const dataBasePath As String = "C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO.MDB"
'let's use the BIBLIO demo database provided with Vb, make sure the path is right.
Set connection = New ADODB.Connection
Set recordset = New ADODB.Recordset
connection.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & dataBasePath & ";"
connection.Open
recordset .Open "SELECT * FROM Authors", connection, adOpenDynamic
End Sub
Your recordset will be filled with the set of records from the Author's table of the database. You may want to check for the Recordset class' properties and methods to find more information on what you are trying to do. Good luck.