472,108 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

ASP.NET Workspace[0].OpenDatabase(...)

Hi there,

I am using DAO to read data from MDB file I try the following command to
open database.
DBEngine dbEng = new DBEngineClass();
Workspace ws = dbEng.Workspaces[0];
db = ws.OpenDatabase(filename, true,false, ";UID=Admin;PWD=" +
Password_DbAdmin);

It is work fine with Window Application. But when I try to call it from
ASP.NET webform I got the following error:
The Microsoft Jet database engine cannot open the file 'C:\Nation.mdb'. It
is already opened exclusively by another user, or you need permission to
view its data.

I did try to set full permission on the file for IUSR_COMPUTER_NAME but it
still give that error.

Please help.
Nov 16 '05 #1
4 5459
Presumably you've made sure the database is in the c:\ drive of the server..
a) set the ASPNET account to have the correct permissions?
b) set the 'impersonate identity' property to true in the web.config ?

Does File.Exists work on it, or does ADO.NET work on it?
(ADO.NET is largely better than DAO for most things...what do you use DAO
for?)
"kids_pro" wrote:
Hi there,

I am using DAO to read data from MDB file I try the following command to
open database.
DBEngine dbEng = new DBEngineClass();
Workspace ws = dbEng.Workspaces[0];
db = ws.OpenDatabase(filename, true,false, ";UID=Admin;PWD=" +
Password_DbAdmin);

It is work fine with Window Application. But when I try to call it from
ASP.NET webform I got the following error:
The Microsoft Jet database engine cannot open the file 'C:\Nation.mdb'. It
is already opened exclusively by another user, or you need permission to
view its data.

I did try to set full permission on the file for IUSR_COMPUTER_NAME but it
still give that error.

Please help.

Nov 16 '05 #2
I need DAO because I want to create/update Query in MDB file on fly.
I don't think ADO.NET allow me to do that.
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
Presumably you've made sure the database is in the c:\ drive of the server.. a) set the ASPNET account to have the correct permissions?
b) set the 'impersonate identity' property to true in the web.config ?

Does File.Exists work on it, or does ADO.NET work on it?
(ADO.NET is largely better than DAO for most things...what do you use DAO
for?)
"kids_pro" wrote:
Hi there,

I am using DAO to read data from MDB file I try the following command to
open database.
DBEngine dbEng = new DBEngineClass();
Workspace ws = dbEng.Workspaces[0];
db = ws.OpenDatabase(filename, true,false, ";UID=Admin;PWD=" +
Password_DbAdmin);

It is work fine with Window Application. But when I try to call it from
ASP.NET webform I got the following error:
The Microsoft Jet database engine cannot open the file 'C:\Nation.mdb'. It is already opened exclusively by another user, or you need permission to
view its data.

I did try to set full permission on the file for IUSR_COMPUTER_NAME but it still give that error.

Please help.

Nov 16 '05 #3
no it won't , you do need DAO for that. Still can't get it to work with those
suggestions?
"kids_pro" wrote:
I need DAO because I want to create/update Query in MDB file on fly.
I don't think ADO.NET allow me to do that.
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
Presumably you've made sure the database is in the c:\ drive of the

server..
a) set the ASPNET account to have the correct permissions?
b) set the 'impersonate identity' property to true in the web.config ?

Does File.Exists work on it, or does ADO.NET work on it?
(ADO.NET is largely better than DAO for most things...what do you use DAO
for?)
"kids_pro" wrote:
Hi there,

I am using DAO to read data from MDB file I try the following command to
open database.
DBEngine dbEng = new DBEngineClass();
Workspace ws = dbEng.Workspaces[0];
db = ws.OpenDatabase(filename, true,false, ";UID=Admin;PWD=" +
Password_DbAdmin);

It is work fine with Window Application. But when I try to call it from
ASP.NET webform I got the following error:
The Microsoft Jet database engine cannot open the file 'C:\Nation.mdb'. It is already opened exclusively by another user, or you need permission to
view its data.

I did try to set full permission on the file for IUSR_COMPUTER_NAME but it still give that error.

Please help.


Nov 16 '05 #4
Thank Bon it works but I have to give it full permission and opendatabase in
exclusive mode.
The issue again here after I load it from ASP page I can't open the MDB file
until I end process aspnet_wb.exe
I am not sure how to configure the impersonate identity.

"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:8B**********************************@microsof t.com...
no it won't , you do need DAO for that. Still can't get it to work with those suggestions?
"kids_pro" wrote:
I need DAO because I want to create/update Query in MDB file on fly.
I don't think ADO.NET allow me to do that.
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
Presumably you've made sure the database is in the c:\ drive of the

server..
a) set the ASPNET account to have the correct permissions?
b) set the 'impersonate identity' property to true in the web.config ?

Does File.Exists work on it, or does ADO.NET work on it?
(ADO.NET is largely better than DAO for most things...what do you use DAO for?)
"kids_pro" wrote:

> Hi there,
>
> I am using DAO to read data from MDB file I try the following command to > open database.
> DBEngine dbEng = new DBEngineClass();
> Workspace ws = dbEng.Workspaces[0];
> db = ws.OpenDatabase(filename, true,false, ";UID=Admin;PWD=" +
> Password_DbAdmin);
>
> It is work fine with Window Application. But when I try to call it from > ASP.NET webform I got the following error:
> The Microsoft Jet database engine cannot open the file 'C:\Nation.mdb'.
It
> is already opened exclusively by another user, or you need
permission to > view its data.
>
> I did try to set full permission on the file for IUSR_COMPUTER_NAME

but it
> still give that error.
>
> Please help.
>
>
>


Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Don Rich | last post: by
reply views Thread by Mullai | last post: by
reply views Thread by leo001 | last post: by

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.