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

Home Posts Topics Members FAQ

using Access database on network share?

I've got a site set up that uses a network share as it's home directory.
Simple stuff is working fine.

When I try to put a database in there, though, I run into problems.

I'm using:

dim dbconn,sql,dbcomm
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data
source=" & server.mappath("test.mdb") & ";")
dbconn.Open()

And I'm getting a message:

Server Error in '/' Application.
Unspecified error
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Unspecified error

Source Error:

Line 16: dim dbconn,sql,dbcomm
Line 17: dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" & server.mappath("test.mdb") & ";")
Line 18: dbconn.Open()

"test.mdb" is in the same folder as the .aspx file (maps to
\\omega\www\dir\test.mdb)

.... If I copy all the files to a local folder on the hard drive and
change the home directory of the site it works fine.

Is is not possible to use an access database on a network share? I can't
imagine that's the case.

Help is appreciated.
Nov 18 '05 #1
4 5891
Is it not possible to use an access database on a network share?
Right. Access is not meant for multi-user activity anyway. If you must use
Access, locate it on the same machine as the web application.
"Scott Nicholson" <us****@scottnic.com> wrote in message
news:cm**********@news.xmission.com...
I've got a site set up that uses a network share as it's home directory.
Simple stuff is working fine.

When I try to put a database in there, though, I run into problems.

I'm using:

dim dbconn,sql,dbcomm
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data
source=" & server.mappath("test.mdb") & ";")
dbconn.Open()

And I'm getting a message:

Server Error in '/' Application.
Unspecified error
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Unspecified error

Source Error:

Line 16: dim dbconn,sql,dbcomm
Line 17: dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" & server.mappath("test.mdb") & ";")
Line 18: dbconn.Open()

"test.mdb" is in the same folder as the .aspx file (maps to
\\omega\www\dir\test.mdb)

... If I copy all the files to a local folder on the hard drive and change
the home directory of the site it works fine.

Is is not possible to use an access database on a network share? I can't
imagine that's the case.

Help is appreciated.

Nov 18 '05 #2
Scott M. wrote:
Is it not possible to use an access database on a network share?
Right. Access is not meant for multi-user activity anyway. If you must use
Access, locate it on the same machine as the web application.


I'd like to be able to edit this web application on both my desktop and
my laptop, so I've set a share on my fileserver as the home directory
for the site on both machines, and made the share available offline on
my laptop. This way I can edit the files on either machine, whether
connected to the network or not, and can preview the files on either
machine at http://localhost/

So the share is \\omega\www, and I've set that share as the home
directory of my website in IIS.

I've created \\omega\www\dir and put "test.mdb" in that dir, and created
db_test.aspx in the same dir that attempts to access the test.mdb file.

You're telling me this won't work?
Nov 18 '05 #3
I'm saying that Access OLEDB connection strings must point to a local
physical path. Server paths won't work.
"Scott Nicholson" <us****@scottnic.com> wrote in message
news:cm**********@news.xmission.com...
Scott M. wrote:
Is it not possible to use an access database on a network share?
Right. Access is not meant for multi-user activity anyway. If you must
use Access, locate it on the same machine as the web application.


I'd like to be able to edit this web application on both my desktop and my
laptop, so I've set a share on my fileserver as the home directory for the
site on both machines, and made the share available offline on my laptop.
This way I can edit the files on either machine, whether connected to the
network or not, and can preview the files on either machine at
http://localhost/

So the share is \\omega\www, and I've set that share as the home directory
of my website in IIS.

I've created \\omega\www\dir and put "test.mdb" in that dir, and created
db_test.aspx in the same dir that attempts to access the test.mdb file.

You're telling me this won't work?

Nov 18 '05 #4
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

"Scott Nicholson" <us****@scottnic.com> wrote in message
news:cm**********@news.xmission.com...
I've got a site set up that uses a network share as it's home directory.
Simple stuff is working fine.

When I try to put a database in there, though, I run into problems.

I'm using:

dim dbconn,sql,dbcomm
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data
source=" & server.mappath("test.mdb") & ";")
dbconn.Open()

And I'm getting a message:

Server Error in '/' Application.
Unspecified error
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Unspecified error

Source Error:

Line 16: dim dbconn,sql,dbcomm
Line 17: dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" & server.mappath("test.mdb") & ";")
Line 18: dbconn.Open()

"test.mdb" is in the same folder as the .aspx file (maps to
\\omega\www\dir\test.mdb)

... If I copy all the files to a local folder on the hard drive and change
the home directory of the site it works fine.

Is is not possible to use an access database on a network share? I can't
imagine that's the case.

Help is appreciated.

Nov 18 '05 #5

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

Similar topics

3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
2
by: TechBoy | last post by:
I am trying to learn on the fly about Access Security for an app we are developing. I realize Access security is an advanced subject with many details. I wanted to share a scenario and ask a...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: ScottB | last post by:
When creating website applications within Visual Studio 2005, I use the File System method because it meets the needs of our environment. In choosing the location of the directory where the files...
4
by: duffaz | last post by:
I am trying to I am trying to connect to an SQL Server using a vb.net program. It works if I put it on the SQL Server computer, but will not connect over my local network that is set up as a...
13
by: Elton Cohen | last post by:
Hi newsgroup! Can anyone tell me where I should put a simple Access database file in order to be accessible for every computer in the network (same workgroup)? There does not need to be any...
7
by: DanZaMan | last post by:
Just a query about how clever access is, I'm using access 97. When using a "split" database with a separate front-end and with the data file on a separate server on the network how does access...
2
by: siewong | last post by:
Existing Access Database Troubleshooting I am new to access database and inherited an access application and all users who were previously able to use this access file simulataneously are now...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
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 ...

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.