can anybody explain what the difference between the 2 codes below?
i'm using visual basic 6 and i'm connecting access dbase.

and one other thing, i'm trying to connect access 2007 with my vb6 but i can't remember the code, i know the code below works with access 2003 and that i'll just have to edit the code below, i also remember that instead of .jet it should be .ace other than that i can't remember what follows.

thanks for the help.

With caba
.CursorLocation = adUseClient
.Open "provider = microsoft.jet.oledb.4.0; data source=" & App.Path & "\DBASE\CABA.mdb;"
End With

With caba
.ConnectionString = "Provider=microsoft.jet.oledb.4.0; data source=" & App.Path & "\DBASE\caba.mdb;"
End With
8 Years
Discussion Span
Last Post by codefixer

the first one uses client side cursor.

can you elaborate further sir? thanks a lot


try creating a 'User DNS' or Drivers from the ODBC Data Source Administrator

then connect using the following example

''in VB i set references to - Microsoft ActiveX Data Objects 2.5 or 'higher say 2.8
'in a module create the following function which will be called on 'the formload of each form
'declare the following on the module

Public cn As New ADODB.Connection

Public Sub Connect()
  With cn
   If .State = adStateOpen Then .Close
    .ConnectionString = "DSN=SaccoSystem2"
  End With
end sub

Edited by happygeek: fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.