Database Connection

Results 1 to 2 of 2

Thread: Database Connection

  1. #1
    Join Date
    Dec 1969

    Default Database Connection

    I have an access database with a linked table inside. The linked table requires a username and password, but I have "saved" these in Access when I linked the table. When I try to read data from the linked table, I get an error message. My asp code is as follows:<BR><BR>set objFIRM = server.createobject("ADODB.Connection")<BR>Set rstemp = Server.CreateObject("ADODB.Recordset")<BR><BR>strF IRMdb = server.mappath("..FIRM.mdb")<BR>strConnectFirm = "Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & strFIRMdb & ";"<BR><BR>objFIRM.Open strConnectFIRM<BR><BR>mySQL = "SELECT service_package.* FROM service_package WHERE (((service_package.svc_pkg_id)&#060;1000));"<BR>rs temp.OPen mySQL, objFIRM<BR><BR>response.write "&#060;Table border = &#039;1&#039;&#062;"<BR>Do While not rstemp.EOF<BR> response.write "&#060;TR&#062;&#060;TD&#062;" & rstemp("svc_pkg_id") & "&#060;/TD&#062;"<BR> rstemp.moveNext<BR>Loop<BR><BR>response.write "&#060;/Table&#062;"<BR>rstemp.Close<BR>%&#062;<BR><BR>My error message is :<BR>Microsoft JET Database Engine error &#039;80004005&#039; <BR><BR>ODBC--connection to &#039;Passkey&#039; failed. <BR><BR>/Commercial/Planning/Maintain/test.asp, line 11 <BR><BR>Where "Passkey" is the name of the SQL Server that the linked table is linked from. Can anyone help me access the linked table?

  2. #2
    Join Date
    Dec 1969

    Default RE: Database Connection

    You should open a new ADO connection to your SQL Server directly from your ASP. Don&#039;t try to go through linked tables.<BR><BR>Dave Kawliche<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