473,691 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Workspace s[0];
db = ws.OpenDatabase (filename, true,false, ";UID=Admin;PWD =" +
Password_DbAdmi n);

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_N AME but it
still give that error.

Please help.
Nov 16 '05 #1
4 5582
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.Workspace s[0];
db = ws.OpenDatabase (filename, true,false, ";UID=Admin;PWD =" +
Password_DbAdmi n);

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_N AME 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**@discussio ns.microsoft.co m> wrote in message
news:A8******** *************** ***********@mic rosoft.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.Workspace s[0];
db = ws.OpenDatabase (filename, true,false, ";UID=Admin;PWD =" +
Password_DbAdmi n);

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_N AME 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**@discussio ns.microsoft.co m> wrote in message
news:A8******** *************** ***********@mic rosoft.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.Workspace s[0];
db = ws.OpenDatabase (filename, true,false, ";UID=Admin;PWD =" +
Password_DbAdmi n);

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_N AME 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**@discussio ns.microsoft.co m> wrote in message
news:8B******** *************** ***********@mic rosoft.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**@discussio ns.microsoft.co m> wrote in message
news:A8******** *************** ***********@mic rosoft.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.Workspace s[0];
> db = ws.OpenDatabase (filename, true,false, ";UID=Admin;PWD =" +
> Password_DbAdmi n);
>
> 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_N AME

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


Nov 16 '05 #5

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

Similar topics

5
5412
by: James Kimble | last post by:
I've inherited a program that was developed in Visual Studio and I'm having a problem with build times. The program is about 250,000 lines and I'm storing the entire project on a network drive. We've got gigabyte ethernet and it's a high speed raid array but it still takes about 5 minutes to do the smallest recompile and about 1 hour and 15 minutes to do a full rebuild (pretty annoying). I'd like to move the object and binary files to...
1
9033
by: deko | last post by:
I need to create and reference a Workspace (kinda new at this...) Here's how it works with the current db: Dim wrk As DAO.Workspace Set wrk = DBEngine.Workspaces(0) wrk.BeginTrans This works fine, but if I want to use another database:
2
3306
by: deko | last post by:
I need to get the Form properties of an mdb I've opened as a Workspace. How do I access the Forms collection? I'm not sure how to navigate the object model here... or if that is even my problem... Private Sub DocumentForm(ByVal strName As String) Dim db As DAO.Database Dim wrk As DAO.Workspace varV = "C:\Documents and Settings\Administrator\My Documents\Database\My.mdb" Set wrk = CreateWorkspace("", "admin", "", dbUseJet)
0
1714
by: Ryan | last post by:
Hello, HELP! I have TWO questions: First, I am trying to execute a SQL pass-through query in Access VBA. According to MSAccess help, I should be able to use the following syntax after Creating an MSJet Workspace: wrkJet.OpenDatabase("Publishers", dbDriverCompleteRequired, True, _
2
4543
by: Jozef | last post by:
Hello, I am trying to put together a module and open a workspace on a database that has a simple password (using Access XP). This is the lin that I'm having trouble with; Set wrk = CreateWorkspace("TestWrkspc", "Admin", conDbPwd) conDBPwd is a variable that contains the password. There is no independant workgroup file, just the default. This is the error message I'm getting;
3
1488
by: Sebastien Tardif | last post by:
After I open a workspace I have access to all C++ files of the workspace. I can put breakpoints. Everything look great... So I go attach to my process and Visual C++ go close my workspace! I don't see the goal of closing the workspace... How can I fix this strange behavior/bug?
2
1354
by: Don Rich | last post by:
Here's the scenario. A user is sitting at a WinXP workstation and maps a drive to one particular remote server. The user then transfers data files to that server and invokes my C++ application executable that resides on that remote server from a simple DOS command line at the workstation. For example, x:\myprogram.exe. This scenario can and often does exist concurrently at different workstations around the country but always with the one...
1
1437
by: tostrowski | last post by:
I am currently creating a Access Report using a wizard. The problem I am having is the workspace will not go beyond 22". The amount of columns I have will not all fit on a 11 x 17 page so I would like to spread out the data over two 11 x 17 pages expanding the workspace to 34". Can somebody help? Thanks. Tim
0
928
by: Mullai | last post by:
In VS2005, we have a set of VC++ 7 projects. We want to find whether a VC++ project used MFC or not in that particular workspace. To find that we used the following way. if à à à is set without using MFC in VS2005, it is judged as . We want to know whether there is any other way we can find whether that workspace used MFC or no MFC.
0
8531
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9079
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8791
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8794
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7623
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4322
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4550
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2965
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 we have to send another system
3
1952
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.