Access 97 / 2000 conflict?

Results 1 to 2 of 2

Thread: Access 97 / 2000 conflict?

  1. #1
    Join Date
    Dec 1969

    Default Access 97 / 2000 conflict?

    I copied someone&#039s database accessing code from their tutorial and I am having a problem accessing my database. This is the section of code that accesses the database:<BR><BR>&#060;!--#include file="adovbs.asp"--&#062;<BR>&#060;%If Request.ServerVariables("Content_Length")&#062;0 Then<BR> If "Insert" = Request("ActionType") Then<BR> Set DataConn = Server.CreateObject("ADODB.Connection")<BR> Set RS = Server.CreateObject("ADODB.RecordSet")<BR> DataConn.Open "DBQ=" & Server.Mappath("db1.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"<BR><BR> RS.Open "ContactInfo", DataConn, adOpenKeyset, adLockOptimistic <BR> RS.AddNew<BR><BR>And the error message:<BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Can&#039t open database &#039(unknown)&#039. It may not be a database that your application recognizes, or the file may be corrupt.<BR><BR>What confuses me is I am running Access2000 but somehow I am referencing a 97 Driver? How is this possible? Is this something I have to upgrade, or is the copied code referring to something that is specifically in 97? I&#039d appreciate any help. Thanks!

  2. #2 Guest

    Default Use OLEDB

    Try:<BR><BR>DataConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.Mappath("db1.mdb") & ";"<BR><BR>This will use the more efficient OLEDB interface and will ensure that you are using the Access 2000 driver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts