Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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 March 18th, 2004, 02:47 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
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
  #2 (permalink)  
Old March 18th, 2004, 03:49 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
  #3 (permalink)  
Old March 18th, 2004, 04:10 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you so much Imar!!!



 


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
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



All times are GMT -4. The time now is 07:29 AM.


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