Wrox Programmer Forums
|
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
 
Old March 18th, 2004, 02:47 PM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 12 uploading mystery

Hi,

I have the chapter 12 example with the movie database working fine on my local computer. But when I publish using Frontpage to my webserver (updating line 21 to refer to the web server rather than my local machine), I get a strange error:

Microsoft JET Database Engine error '80004005'
Not a valid file name.
/BegASPFiles/connect.asp, line 21

A simple error, you might think - I've just referred to connect.asp instead of Movie2000.mdb. But I haven't! Honestly! Look, here's the connection code pasted from the connect.asp file on the webserver:

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=http://mywebserver.com/BegASPFIles/Movie2000.mdb;" & _
               "Persist Security Info=False"

What am I doing wrong???

Any help much, much appreciated - this is driving me bonkers.

Cheers

Graham
 
Old March 18th, 2004, 03:49 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The Data Source needs a physical path, not a Web path. So, you'll need something like this:

Data Source=C:\Database\BegASPFIles\Movie2000.mdb;


If you don't know where he physical file is located (when you host your site with an ISP for example), but you *do* know it's located in a folder called Databases in the root of your site for example, try this for the connection string:

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("/Databases/Movie2000.mdb") & ";" & _
     "Persist Security Info=False"

This will return a path like c:\inetpub\wwwroot\YourSite\Databases\Movie2000.md b which is a valid path for the DataSource.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 18th, 2004, 04:10 PM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you so much Imar!!!








Similar Threads
Thread Thread Starter Forum Replies Last Post
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Chapter 12... rrlevron BOOK: Beginning ASP 3.0 2 January 16th, 2006 01:09 AM





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