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 May 10th, 2000, 09:50 AM
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
How Do I create a db connection path that will be the same on different web servers

<i><b>Originally posted by : KevinM (mullarkey@fs5.ee.umist.ac.uk)</b></i><br />I develop and test my asp pages locally using PWS.<br />But when I upload to the main web server the path connect string to the db will be different.<br />Is there any way I can set up the path so it will be automatically be seen regardless of the web server.<br /><br />The problem is that the main web server has several added paths and sub webs before it gets to the location of the db.<br /><br />Many Thanks<br /><br />Kevin M<br />

Reply With Quote
  #2  
Old May 10th, 2000, 01:58 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 : Eric H (ek1667@hotmail.com)</b></i><br />This is called a DSNless Connection to<br />the Database<br /><br />strConn = "DBQ=" & Server.Mappath("database.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"<br /><br />The Server.Mappath will give you the physical path on the server hard drive pointing to your directory. If you need to get into subfolders to locate your database then you just have to use Server.Mappath("sub-folder/sub-folder/database.mdb")...etc...<br /><br />Set conn = Server.CreateObject("ADODB.Connection")<br />conn.open strConn<br /><br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > How Do I create a db connection path that will be the same on different web servers


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 5 hosted by Hostway
Stay green...Green IT