Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 August 7th, 2006, 01:02 PM
Authorized User
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default data source to db on mapped drive

Hi,

I cannot figure out the syntax to create a datasource to a db located on a mapped drive. I get the same error which is [location of db] is not a valid path'. I've tried all the following but none work:

conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=M:\MergedActions.mdb", "", ""

conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=M:/MergedActions.mdb", "", ""

conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\sharedFolder\db\cis\MergedActions.mdb", "", ""

 
Old August 7th, 2006, 01:36 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Shouldn't that be

\\ServerName\ShareName\SomeFolder\SomeFile.mdb??


Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old August 7th, 2006, 02:27 PM
Authorized User
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No that did not work either.

 
Old August 7th, 2006, 02:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you describe "did not work"??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old August 7th, 2006, 02:43 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I agree with Imar, your UNC path CANNOT be what the sharefolder is called, it has to be referenced with \\ServerName\share\folder\some.mdb

and really it should be something like this:

\\Server\C$\sharedfolder\theMDBfile.mdb

C$ should be replaced by the appropriate drive letter (but you must maintain the $ symbol)
so:
D == D$
E == E$

etc.

Hth.

"The one language all programmers understand is profanity."
 
Old August 7th, 2006, 02:52 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:C$ should be replaced by the appropriate drive letter (but you must maintain the $ symbol)
Not necessarily.

The $ syntax is used to access administrative shares that are always present. However, you can also create and name your own shares. So, a path like:

\\ServerName\ShareName

could be perfectly valid.

If we know the error, we may be able to advice more. Maybe this is a security issue?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old August 7th, 2006, 02:53 PM
Authorized User
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Error Type:
Microsoft JET Database Engine (0x80004005)
'\\myserverName\sandshare\winSHARE\db\cis\Web_Deve lopment\MergedActions.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
/metrics/CommitToClose.asp, line 42


 
Old August 7th, 2006, 02:59 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right, that's what I thought. 80004005 errors are almost always security related. Check out these FAQs:

http://Imar.Spaanjaars.Com/QuickDocId.aspx?quickdoc=263
http://Imar.Spaanjaars.Com/QuickDocId.aspx?quickdoc=276
http://Imar.Spaanjaars.Com/QuickDocId.aspx?quickdoc=287

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old August 7th, 2006, 03:09 PM
Authorized User
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thank you, I'll take a look at these articles.

 
Old August 8th, 2006, 07:02 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Thanks for pointing that out Imar, I assumed since he was mapping a network .MDB that the share would always be available, you are correct however.

"The one language all programmers understand is profanity."





Similar Threads
Thread Thread Starter Forum Replies Last Post
mapped drive khansa PHP How-To 0 February 23rd, 2006 07:46 AM
mapped drive khansa PHP How-To 0 February 23rd, 2006 07:43 AM
Mapped drive khansa MySQL 1 February 23rd, 2006 05:38 AM
How to find if drive is a mapped drive BrianWren Pro VB 6 1 June 2nd, 2005 04:07 AM
How to find if drive is a mapped drive BrianWren Access VBA 0 June 1st, 2005 04:55 PM





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