ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 12th, 2000, 12:28 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
ADO Connection to an Access Database not located on Web Server

<i><b>Originally posted by : Jeff Wells (jeff.wells@mencap.org.uk)</b></i><br />I'm having difficulty getting my .asp pages to connect to an Access Database which is located on a different server to the web server the pages are running on. Here's the essential code and error message. Can anyone help?<br /><br /><%@ Language=VBScript %><br /><%<br />Set DataConn = Server.CreateObject("ADODB.Connection")<br /> <br />Set rs = server.CreateObject("ADODB.Recordset")<br /> <br />DataConn.ConnectionTimeout = Session("DataConn_ConnectionTimeout")<br />DataConn.CommandTimeout = Session("DataConn_CommandTimeout")<br /><br />'This points to a virtual directory (NC_Telephone_Exts) on the Web Server <br />' which points to the other server (\Golden) - doesn't work<br />'DataConn.Open "DBQ="+server.mappath("NC_Telephone_Exts elephonelist.mdb")+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br />'This is a physical path to the other server - doesn't work<br />'DataConn.Open "DBQ="+"\GoldenNC1FDataPLUAccess elephonelist.mdb"+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br />'This points to a mapped drive on the web server itself pointing at \Golden - doesn't work<br />'DataConn.Open "DBQ=M: elephonelist.mdb"+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br />'These point to the other server (\Golden) -don't work<br />'DataConn.open "FILEDSN=NC_TELE","",""<br />'DataConn.open "DSN=NC_TELE_DSN","",""<br /><br />'This points to a copy of the database located on the Web Server itself - does work<br />'DataConn.Open "DBQ="+server.mappath("telephonelist.mdb")+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br /><br />str1 = "Select * from qryA2E"<br /><br />rs.Open str1, DataConn, 3<br /><br />%><br /><br />' All of the above produce the same error message:<br /><br />"Microsoft OLE DB Provider for ODBC Drivers error '80004005' <br /><br />[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. <br />Make sure that the path name is spelled correctly and that you are connected to<br />the server on which the file resides." <br />

Reply With Quote
  #2  
Old June 14th, 2000, 12:55 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : steve</b></i><br />instead of a mapped network drive letter try a unc path \servernamesharenamedbname<br /><br /><br />------------<br />Jeff Wells at 6/12/2000 9:28:19 AM<br /><br />I'm having difficulty getting my .asp pages to connect to an Access Database which is located on a different server to the web server the pages are running on. Here's the essential code and error message. Can anyone help?<br /><br /><%@ Language=VBScript %><br /><%<br />Set DataConn = Server.CreateObject("ADODB.Connection")<br /> <br />Set rs = server.CreateObject("ADODB.Recordset")<br /> <br />DataConn.ConnectionTimeout = Session("DataConn_ConnectionTimeout")<br />DataConn.CommandTimeout = Session("DataConn_CommandTimeout")<br /><br />'This points to a virtual directory (NC_Telephone_Exts) on the Web Server <br />' which points to the other server (\Golden) - doesn't work<br />'DataConn.Open "DBQ="+server.mappath("NC_Telephone_Exts elephonelist.mdb")+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br />'This is a physical path to the other server - doesn't work<br />'DataConn.Open "DBQ="+"\GoldenNC1FDataPLUAccess elephonelist.mdb"+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br />'This points to a mapped drive on the web server itself pointing at \Golden - doesn't work<br />'DataConn.Open "DBQ=M: elephonelist.mdb"+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br />'These point to the other server (\Golden) -don't work<br />'DataConn.open "FILEDSN=NC_TELE","",""<br />'DataConn.open "DSN=NC_TELE_DSN","",""<br /><br />'This points to a copy of the database located on the Web Server itself - does work<br />'DataConn.Open "DBQ="+server.mappath("telephonelist.mdb")+";Driver={Microsoft Access Driver (*.mdb)};", Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")<br /><br /><br />str1 = "Select * from qryA2E"<br /><br />rs.Open str1, DataConn, 3<br /><br />%><br /><br />' All of the above produce the same error message:<br /><br />"Microsoft OLE DB Provider for ODBC Drivers error '80004005' <br /><br />[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. <br />Make sure that the path name is spelled correctly and that you are connected to<br />the server on which the file resides." <br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > ADO Connection to an Access Database not located on Web Server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT