Author Topic: What driver do I need to wrtie to Access 97 file  (Read 2569 times)

0 Members and 1 Guest are viewing this topic.

Amsterdammed

  • Guest
What driver do I need to wrtie to Access 97 file
« on: November 16, 2007, 04:43:50 AM »
Hello everybody,

I got some wonderfull code here on this Forum to connect Excel to Access and vice versa. It works fine, so I can send data from Excel to an access.mdb file to append it. It uses the
Code: [Select]

Dim rs As New ADODB.Recordset     '// you can use As Object for the late binding
     Dim SQLstr As String

     On Error GoTo Err_Control
     Set cnn = CreateObject("ADODB.Connection")
     SQLstr = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & dbPath & ";" & _
              "Jet OLEDB:Engine Type=4"
     cnn.Open SQLstr


as connection.

So far so good, but i can't write to older versions off Access with that driver, so my question for today is, is there simply another driver i can use to connect to that type of mdb file??

Thanks in Advance

Bernd

Fatty

  • Guest
Re: What driver do I need to wrtie to Access 97 file
« Reply #1 on: November 16, 2007, 07:51:36 AM »
Hi
Try following
Open database, switch to VBAIDE, insert module
then add this code into module:

Code: [Select]
Option Compare Database
Option Explicit
Sub GetConnString()
MsgBox CurrentProject.BaseConnectionString
End Sub

Not sure about it will be work in 97 I can't test it

~'J'~

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8661
  • AKA Daniel
Re: What driver do I need to wrtie to Access 97 file
« Reply #2 on: November 16, 2007, 08:42:04 AM »
You need to use jet 3.51 for access 97
http://support.microsoft.com/default.aspx/kb/172733
so you might need to change your provider to something like
"Provider=Microsoft.Jet.OLEDB.3.51;"

Amsterdammed

  • Guest
Re: What driver do I need to wrtie to Access 97 file
« Reply #3 on: November 16, 2007, 12:12:06 PM »
The point is that i have XP on my computer, but the vertical i have to deal with has that bdase still in access 97.

Amsterdammed

  • Guest
Re: What driver do I need to wrtie to Access 97 file
« Reply #4 on: November 16, 2007, 02:29:12 PM »
If i set it to 3.51, i get an error msg that the provider might not be installed properly, makes sense, i don't have Office 97 on my PC.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8661
  • AKA Daniel
Re: What driver do I need to wrtie to Access 97 file
« Reply #5 on: November 17, 2007, 08:01:34 AM »
I don’t think you need office 97 installed on your computer, only the jet divers. The example I gave you was just, off the top of my head,You will need to research the provider. Obviously the vertical you’re using can Read/Write to access 97, so you can too.  :wink:
What did the vertical install? Did you try adding a reference to the 3.51 library?

Amsterdammed

  • Guest
Re: What driver do I need to wrtie to Access 97 file
« Reply #6 on: November 17, 2007, 02:08:46 PM »
Daniel,

Quote
Obviously the vertical you’re using can Read/Write to access 97, so you can too

Thought so, too

How should the reference be called? :?

Thanks Bernd
« Last Edit: November 17, 2007, 04:04:28 PM by Amsterdammed »