connecting to Access Database

Results 1 to 2 of 2

Thread: connecting to Access Database

  1. #1
    Join Date
    Dec 1969

    Default connecting to Access Database

    I am having problem connecting to the Access Database. I have an Oracle Database which is linked to Access Database, both are on different Servers. I have a query in Access which uses these Tables. I get the error massage saying in my ASP code when I try to connect to this query which uses tables from Oracle. But when I try to open a local table then it works. Thanks for Your help.<BR><BR>THis the the error message:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR>[Microsoft][ODBC Microsoft Access Driver] ODBC--connection to &#039;ORCDBA&#039; failed. <BR>/folder_Name/fileName.asp, line 15 <BR><BR><BR>The code it here:<BR><BR>&#060;html&#062;<BR>&#060;body&#062;< BR>&#060;p&#062;This is a view of database&#060;/p&#062;<BR>&#060;%@ LANGUAGE=JScript %&#062;<BR>&#060;!-- #include file = "" --&#062;<BR>&#060;%<BR>con = Server.CreateObject("ADODB.Connection");<BR>con.Op en("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" + Server.MapPath("Web Page ASP") + "\topfive.mdb");<BR>sql = "SELECT *FROM sample WHERE NAME = &#039;ABC&#039;";<BR>CurrentRecordset = con.Execute(sql)<BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default This should help

    I am fairly new to this stuff too but I think that what you need to be doing is the following.<BR><BR>con.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" + Server.MapPath("topfive.mdb")<BR><BR>This works for me and should work for you too.

Posting Permissions

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