Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 19th, 2004, 10:09 PM
Registered User
 
Join Date: Feb 2004
Location: Morehead City, NC, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Location

Have downloaded Movie2000.mdb (Access97) from wrox site. Created asp file from book. I am using an ISP's site (Earthlink) to run these codes. Even though I have uploaded both the database and the asp file to the same directory, I still get a location error even though I have entered the location as "Data Source=Movies2000.mdb", without any upper directories. The error, as follows seems to be a default. Is there a specific place the database must be?

Microsoft JET Database Engine error '80004005'
Could not find file 'C:\WINNT\system32\Movie2000.mdb'.
/asp_scripts/database1.asp, line 24
  #2 (permalink)  
Old February 20th, 2004, 04:27 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

If you don't specify a path for the database, the server will assume the "current folder" which, in the case of ASP Scripts, is the System32 folder.

You can use Server.MapPath to transform a virtual location to a fixed location:

"Data Source=" & Server.MapPath("Movies2000.mdb")

this will return something like c:\inetpub\wwwroot\YourAccountName\Movies2000.mdb which is the physical location of the file.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Location Makepeace1 Classic ASP Databases 2 May 20th, 2008 07:51 AM
Database at different location gaurav_jain2403 ADO.NET 4 May 29th, 2006 12:50 AM
Subreport with database location issue dantetang BOOK: Professional Crystal Reports for VS.NET 0 September 4th, 2005 11:09 PM
Changing Database Location in Runtime jstokes8447 Crystal Reports 0 December 28th, 2004 06:37 PM
Set Database Location dazzer Crystal Reports 1 July 26th, 2004 09:33 AM



All times are GMT -4. The time now is 05:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.