473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Accessing an Access Database

Hi all,

I am using VB script in ASP to access a MS Access database. This works fine
until I want to access the same db placed on a file share.

The code I am using is...

'create connection object
Set db = Server.CreateObject("ADODB.Connection")
'specify the database provider
db.Provider = "Microsoft.Jet.OLEDB.4.0"

'declare the location of the database
db.ConnectionString = "Data Source=\\fileshare\directory\database.mdb"

I get an error to the effect...

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine
cannot open the file '(unknown)'. It is already opened exclusively by
another user, or you need permission to view its data.[Microsoft][ODBC
Microsoft Access Driver] The Microsoft Jet database engine cannot open the
file '(unknown)'. It is already opened exclusively by another user, or you
need permission to view its data.

I guess this is because the remote file share can't authenticate me as the
effective user of the page is anonymous.

Does anybody know how I would be able to get this to work?

N.B The users who are using the website will be logging onto the same domain
that the file share is on and the file share has the correct permissions set
for the users that need access.

-Cheers, Russell.
Nov 17 '05 #1
3 7881
Try creating a DSN configured to access the database with an account with
sufficient privileges.
Then change your connection string to;

db.ConnectionString = "DSN=YourDSNName"

Let us know if that works

"Russell Read [MSFT]" <ru******@online.microsoft.com> wrote in message
news:un*************@tk2msftngp13.phx.gbl...
Hi all,

I am using VB script in ASP to access a MS Access database. This works fine until I want to access the same db placed on a file share.

The code I am using is...

'create connection object
Set db = Server.CreateObject("ADODB.Connection")
'specify the database provider
db.Provider = "Microsoft.Jet.OLEDB.4.0"

'declare the location of the database
db.ConnectionString = "Data Source=\\fileshare\directory\database.mdb"

I get an error to the effect...

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by
another user, or you need permission to view its data.[Microsoft][ODBC
Microsoft Access Driver] The Microsoft Jet database engine cannot open the
file '(unknown)'. It is already opened exclusively by another user, or you
need permission to view its data.

I guess this is because the remote file share can't authenticate me as the
effective user of the page is anonymous.

Does anybody know how I would be able to get this to work?

N.B The users who are using the website will be logging onto the same domain that the file share is on and the file share has the correct permissions set for the users that need access.

-Cheers, Russell.

Nov 17 '05 #2
Hi George,

Thanks for the info - however it didn't work :(

I created a System DSN on the server and pointed it to the Access db on the
file share. This created OK and to test it I opened Excel and populated a
Pivot Table with the data just to check the DSN was working properly - this
all worked fine.

I then changed the code I had so that it was just...

Set db = Server.CreateObject("ADODB.Connection")
db.ConnectionString = "DSN=myDSNshare"

....and when I try and load the page, after a while I get the error

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine
cannot open the file '(unknown)'. It is already opened exclusively by
another user, or you need permission to view its data.

Can you think of anything else I could try?

-Cheers, Russell.


"George Durzi" <gd****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Try creating a DSN configured to access the database with an account with
sufficient privileges.
Then change your connection string to;

db.ConnectionString = "DSN=YourDSNName"

Let us know if that works

"Russell Read [MSFT]" <ru******@online.microsoft.com> wrote in message
news:un*************@tk2msftngp13.phx.gbl...
Hi all,

I am using VB script in ASP to access a MS Access database. This works

fine
until I want to access the same db placed on a file share.

The code I am using is...

'create connection object
Set db = Server.CreateObject("ADODB.Connection")
'specify the database provider
db.Provider = "Microsoft.Jet.OLEDB.4.0"

'declare the location of the database
db.ConnectionString = "Data Source=\\fileshare\directory\database.mdb"

I get an error to the effect...

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database

engine
cannot open the file '(unknown)'. It is already opened exclusively by
another user, or you need permission to view its data.[Microsoft][ODBC
Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

I guess this is because the remote file share can't authenticate me as the effective user of the page is anonymous.

Does anybody know how I would be able to get this to work?

N.B The users who are using the website will be logging onto the same

domain
that the file share is on and the file share has the correct permissions

set
for the users that need access.

-Cheers, Russell.


Nov 18 '05 #3
INFO: Permissions to Connect to a Remote Access Database from ASP.NET

http://support.microsoft.com/default...b;en-us;307901
"Russell Read [MSFT]" <ru******@online.microsoft.com> wrote in message
news:un*************@tk2msftngp13.phx.gbl...
Hi all,

I am using VB script in ASP to access a MS Access database. This works fine until I want to access the same db placed on a file share.

The code I am using is...

'create connection object
Set db = Server.CreateObject("ADODB.Connection")
'specify the database provider
db.Provider = "Microsoft.Jet.OLEDB.4.0"

'declare the location of the database
db.ConnectionString = "Data Source=\\fileshare\directory\database.mdb"

I get an error to the effect...

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by
another user, or you need permission to view its data.[Microsoft][ODBC
Microsoft Access Driver] The Microsoft Jet database engine cannot open the
file '(unknown)'. It is already opened exclusively by another user, or you
need permission to view its data.

I guess this is because the remote file share can't authenticate me as the
effective user of the page is anonymous.

Does anybody know how I would be able to get this to work?

N.B The users who are using the website will be logging onto the same domain that the file share is on and the file share has the correct permissions set for the users that need access.

-Cheers, Russell.

Nov 18 '05 #4

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

Similar topics

3
by: Scott Castillo | last post by:
Is it possible to access an SQL Server database from a Javascript client? I know you can transfer variables from middleware to Javascript client, but was wondering if you can directly access...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
3
by: mark.jerrom | last post by:
I'm fairly new to this Web Service game so please feel free to suggest something different if it looks like i'm completely off track! I'm trying to write an application that runs on a Pocket PC...
0
by: John Fleming | last post by:
Hello, I am building a web application with the following components: 2 Web Servers - Windows Server 2003 - IIS 6 - .Net Framework version 2.0 - Reside in Domain A 2 Clustered Database...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
5
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web...
5
by: Mike | last post by:
I'm having trouble accessing SQL2005 Standard Edition as a second instance of SQL Server where the first instance is SQL 2000 Enterprise Edition. I installed SQL 2005 as a named instance...
2
by: le0 | last post by:
guys, this is my first time to deploy website to the server, but every time i access the page this error always appears. ...
3
by: Nathan Sokalski | last post by:
When I attempt to access a Microsoft Access database from my website, I recieve the following error: Server Error in '/' Application....
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.