Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.


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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.