Connecting to Access2000

Results 1 to 2 of 2

Thread: Connecting to Access2000

  1. #1
    Join Date
    Dec 1969

    Default Connecting to Access2000

    I am trying to connect to Access 2000 using this code.<BR><BR>strDBPath = "C:Chandramantis.mdb"<BR>set cnnSimple = Server.Createobject("ADODB.connection")<BR>cnnSimp le.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDBPath & ";"<BR><BR>But it ends up giving an error message<BR><BR>Microsoft JET Database Engine error &#039;80004005&#039; <BR><BR>&#039;C:Chandramantis.mdb&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. <BR><BR>/mantis20/tryconnect.asp, line 11 <BR><BR><BR>Please help me in sorting this out.<BR><BR>Thank you in advance.

  2. #2
    Join Date
    Dec 1969

    Default RE: Connecting to Access2000

    Try this and I hope it works for you<BR><BR>MyAccessDB = "C:/Chandrab/mantis.mdb"<BR>MyDSN = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"<BR>MyDSN=M yDSN & "DATA SOURCE=" & server.mappath(MyAccessDB) & ";"<BR>Set connepoint = Server.CreateObject("ADODB.Connection")<BR>connepo MyDSN<BR>Set rsItm = Server.CreateObject("ADODB.Recordset")<BR><BR>

Posting Permissions

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