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;"
.Open
End With

the first one uses client side cursor.

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"
    .Open
  End With
end sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.