473,473 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ASP.NET & Access Database!

I am trying to connect to an Access database on a network drive and
the web server is on the same network, i.e. G:\sample\test.mdb and
everytime I try to connect to it I get an error saying...
'G:\sample\test.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. I then tried giving the full path to the server,
i.e. \\webserver\c:\inetpub\... but got the same error.

When I move the database to my local computer it works fine. Here is
the connection string I am trying to use.

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=G:\sample\test.mdb;
When I connect via regular ASP using this custom connection string,
everything works correct... any ideas?

"Driver={Microsoft Access Driver (*.mdb)}; Dbq=G:\sample\test.mdb"
Nov 18 '05 #1
3 1674
The default ASPNET user account doesn't have network permissions.
One solution is to change ASP.NET to run under a different account that has
the necessary permissions. For testing purposes I suggest having it run
under your user account since you know you have permission.

For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyAppUser">
password="password"/>

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"blantz" <br*********@asahq.com> wrote in message
news:18**************************@posting.google.c om...
I am trying to connect to an Access database on a network drive and
the web server is on the same network, i.e. G:\sample\test.mdb and
everytime I try to connect to it I get an error saying...
'G:\sample\test.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. I then tried giving the full path to the server,
i.e. \\webserver\c:\inetpub\... but got the same error.

When I move the database to my local computer it works fine. Here is
the connection string I am trying to use.

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=G:\sample\test.mdb;
When I connect via regular ASP using this custom connection string,
everything works correct... any ideas?

"Driver={Microsoft Access Driver (*.mdb)}; Dbq=G:\sample\test.mdb"

Nov 18 '05 #2
You have G:\ hardcoded, is the web server have also have the G:\ drive
pointing to the same share? Why not create a DSN on the web server to point
to your Access database? By doing this your code can just point to a DSN
name and not the actual database?

"blantz" wrote:
I am trying to connect to an Access database on a network drive and
the web server is on the same network, i.e. G:\sample\test.mdb and
everytime I try to connect to it I get an error saying...
'G:\sample\test.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. I then tried giving the full path to the server,
i.e. \\webserver\c:\inetpub\... but got the same error.

When I move the database to my local computer it works fine. Here is
the connection string I am trying to use.

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=G:\sample\test.mdb;
When I connect via regular ASP using this custom connection string,
everything works correct... any ideas?

"Driver={Microsoft Access Driver (*.mdb)}; Dbq=G:\sample\test.mdb"

Nov 18 '05 #3
try to use DSN, and refer to it in your connection string instead of
hardcoding your MDB location path.

HTH,
andy

"blantz" <br*********@asahq.com> wrote in message
news:18**************************@posting.google.c om...
I am trying to connect to an Access database on a network drive and
the web server is on the same network, i.e. G:\sample\test.mdb and
everytime I try to connect to it I get an error saying...
'G:\sample\test.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. I then tried giving the full path to the server,
i.e. \\webserver\c:\inetpub\... but got the same error.

When I move the database to my local computer it works fine. Here is
the connection string I am trying to use.

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=G:\sample\test.mdb;
When I connect via regular ASP using this custom connection string,
everything works correct... any ideas?

"Driver={Microsoft Access Driver (*.mdb)}; Dbq=G:\sample\test.mdb"

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Will | last post by:
On the subject of Data Warehouses, Data Cubes & OLAP…. I would like to speak frankly about Data Warehouses, Data Cubes and OLAP (on-line analytical processing). Has it dawned on anyone else...
2
by: lobrys | last post by:
hi I build a VB .NET application that makes file access, environnemet acess, database access, etc.... If I ran the app locally, everything works....(normal) If I copy the app on a server, and...
9
by: Greg Gursky | last post by:
Hello: I'm doing some planning on a potential project with which I need some help. The database at the focus of this question is a MS Access database that is currently accessed by DAO from a...
2
by: kma | last post by:
I am designing an Access 2000 database on a computer running Windows 98. I have one form with several tabs; all of which have sub forms, some with a subform on a subform. For example, on my...
2
by: cisco | last post by:
Could anyone point me in the direction of a document that describes the difference between JET and Access? I can't seem to find anything. Another question i have is i have this application (.net)...
3
by: Tim Marshall | last post by:
My A2003 is set up so that the default file format is Access 2000 (options, advanced tab). I've just tried to make my first A2003 mdb into an mde and I get an error saying: "you cannot create a...
15
by: Bart | last post by:
Hi, I receive an utf8 character from a database, like 田 (Japanese Character, style: &#XXXXX). How can I visualize the Japanese character on my application? I have found the class...
5
by: XFER | last post by:
Does anyone know how well 10 concurrent users will perform on the above config? Are there any known issues, limits to using MS Access with IIS 5 and ASP.net on a non- ..net server (NT)? thanks.
3
by: MW de Jager | last post by:
I'm having endless problems with gaining access to an Access Database that sits on a different server. My ASP.NET app cannot gain control. The errror message I get is: The Microsoft Jet...
4
by: Suzette | last post by:
I have an excel file that automatically updates when opened, pulling information from an Access database into into various pivot tables. I created a macro in Access to perform various necessary...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.