469,582 Members | 2,483 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,582 developers. It's quick & easy.

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 5389
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
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.