473,378 Members | 1,607 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,378 software developers and data experts.

MS Access and Web Forms

Hi all,

I am trying to browse a table in my MS Access DB
from a web form, using a bound datagrid. The DB
is populated, and the grid in on the web form. When
I execute the following code:

daDrawings.Fill(DsDrawings1.tblDrawing)
daIssue.Fill(DsDrawings1.tblIssue)

DataGrid1.DataSource = DsDrawings1.tblDrawing
DataGrid1.DataBind()

I get the following error:
The Microsoft Jet database engine cannot open the file 'C:\Documents
and Settings\jason\My Documents\Visual Studio
Projects\Cascades\myDB.mdb'. It is already opened exclusively by
another user, or you need permission to view its data. 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: The Microsoft Jet
database engine cannot open the file 'C:\Documents and
Settings\jason\My Documents\Visual Studio
Projects\Cascades\myDB.mdb'.It is already opened exclusively by
another user, or you need permission to view its data. Source Error: Line 154: 'Put user code to initialize the page here
Line 155:
Line 156: daDrawings.Fill(DsDrawings1.tblDrawing)
Line 157: daIssue.Fill(DsDrawings1.tblIssue)
Line 158:


I am using a typed dataset. I have set the permission on the folder
that contains the MDB file and the access permissions to the file
itself for the Internet Guest Account on my machine and yet I still
get this error. The DB doesn't appear to be open.

Does anyone know what might be going wrong?

Many thanks,

Jason.
Nov 21 '05 #1
2 1354
Hi Jason,

Are you using IIS? If so, have set up the application correctly in IIS? To
check this, go into IIS, view the properties on the web application, view
the Home Directory tab and see if the Application Protection is set to
Medium or High. If the Unload button to the right is enabled, click it. It
usually mean that IIS has kept the application open and it is this that
could be still using the Access file.

Another check that you could do is attempt to move it from that location to
see if it is really in use by anything.

Are you using the Application or Session objects to store open connections
.... yuck?! If so, you'll need to tidy the code up. When linking Access to
web forms, it is always good to use disconnected data, this way, the main
source remains free for anyone (authorised) to use.

Hope this helps.

Landers
"Jason L James" <ja***@nospam.divemaster.org> wrote in message
news:1l********************************@4ax.com...
Hi all,

I am trying to browse a table in my MS Access DB
from a web form, using a bound datagrid. The DB
is populated, and the grid in on the web form. When
I execute the following code:

daDrawings.Fill(DsDrawings1.tblDrawing)
daIssue.Fill(DsDrawings1.tblIssue)

DataGrid1.DataSource = DsDrawings1.tblDrawing
DataGrid1.DataBind()

I get the following error:
The Microsoft Jet database engine cannot open the file 'C:\Documents
and Settings\jason\My Documents\Visual Studio
Projects\Cascades\myDB.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.

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: The Microsoft Jet
database engine cannot open the file 'C:\Documents and
Settings\jason\My Documents\Visual Studio
Projects\Cascades\myDB.mdb'.It is already opened exclusively by
another user, or you need permission to view its data.

Source Error:

Line 154: 'Put user code to initialize the page here
Line 155:
Line 156: daDrawings.Fill(DsDrawings1.tblDrawing)
Line 157: daIssue.Fill(DsDrawings1.tblIssue)
Line 158:


I am using a typed dataset. I have set the permission on the folder
that contains the MDB file and the access permissions to the file
itself for the Internet Guest Account on my machine and yet I still
get this error. The DB doesn't appear to be open.

Does anyone know what might be going wrong?

Many thanks,

Jason.

Nov 21 '05 #2
Landers,

I think it was folder security that sorted it in the end. The
parent of the parent of the folder where the MDB file was
stored did not grant access to the guest account.

All seems fine now.

Thanks,

Jason.

On Tue, 9 Nov 2004 21:47:17 -0000, "Landley"
<ne**@creations-software.co.uk> wrote:
Hi Jason,

Are you using IIS? If so, have set up the application correctly in IIS? To
check this, go into IIS, view the properties on the web application, view
the Home Directory tab and see if the Application Protection is set to
Medium or High. If the Unload button to the right is enabled, click it. It
usually mean that IIS has kept the application open and it is this that
could be still using the Access file.

Another check that you could do is attempt to move it from that location to
see if it is really in use by anything.

Are you using the Application or Session objects to store open connections
... yuck?! If so, you'll need to tidy the code up. When linking Access to
web forms, it is always good to use disconnected data, this way, the main
source remains free for anyone (authorised) to use.

Hope this helps.

Landers
"Jason L James" <ja***@nospam.divemaster.org> wrote in message
news:1l********************************@4ax.com.. .
Hi all,

I am trying to browse a table in my MS Access DB
from a web form, using a bound datagrid. The DB
is populated, and the grid in on the web form. When
I execute the following code:

daDrawings.Fill(DsDrawings1.tblDrawing)
daIssue.Fill(DsDrawings1.tblIssue)

DataGrid1.DataSource = DsDrawings1.tblDrawing
DataGrid1.DataBind()

I get the following error:
>The Microsoft Jet database engine cannot open the file 'C:\Documents
>and Settings\jason\My Documents\Visual Studio
>Projects\Cascades\myDB.mdb'. It is already opened exclusively by
>another user, or you need permission to view its data.

>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: The Microsoft Jet
>database engine cannot open the file 'C:\Documents and
>Settings\jason\My Documents\Visual Studio
>Projects\Cascades\myDB.mdb'.It is already opened exclusively by
>another user, or you need permission to view its data.

>Source Error:

>Line 154: 'Put user code to initialize the page here
>Line 155:
>Line 156: daDrawings.Fill(DsDrawings1.tblDrawing)
>Line 157: daIssue.Fill(DsDrawings1.tblIssue)
>Line 158:


I am using a typed dataset. I have set the permission on the folder
that contains the MDB file and the access permissions to the file
itself for the Internet Guest Account on my machine and yet I still
get this error. The DB doesn't appear to be open.

Does anyone know what might be going wrong?

Many thanks,

Jason.


Nov 21 '05 #3

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

Similar topics

1
by: J | last post by:
Hi, Ive got 3 forms, (a subform within a subform within a form) and when I refresh the outermost form, Access closes and offers to send an error report. The forms worked fine a few weeks ago,...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
22
by: Deano | last post by:
Hi, I have a finished Microsoft Access app that we are distributing using an Access runtime. This works fine (mostly) but I'm sold on the advantages of dot.NET and upgrading to vb.NET seems...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
34
by: Mathieu Trentesaux | last post by:
Hello I downloaded Office 2007 for this reason : It seems, once again, that it is impossible to save any modification done in a VBA library, from the main project in Access. The save button...
9
by: Bob Alston | last post by:
I am looking for electronic forms software that would integrate well with MS Access. I have a client for whom I built a client database to replace and update one they had that was obsolete and...
11
by: Chad | last post by:
Hi Is it possible to substitute an alternative data source (eg MySQL or SQL Server) into an existing MS-Access application?
6
by: Wesley Peace | last post by:
I hate to cross post, but I've gotten no answer yet on a problem I'm having with visual studio 2008. I've created a series of forms with controls to access a Access database tables. The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.