Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 11th, 2003, 07:56 AM
Authorized User
Join Date: Oct 2003
Location: , , Canada.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Begginer Asp difficulty connecting to acces databa


I am using Visual studio. net application to create my asp file.

These are the errors i am constantly getting!!!

The Microsoft Jet database engine cannot open the file 'C:\database\Northwind.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

Line 194: Private Sub Page_Load(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles MyBase.Load

Line 196: OleDbDataAdapter1.Fill(DataSet1)this line is highlighted by my debugger

Line 197: DataGrid1.DataSource = DataSet1
Line 198: DataGrid1.DataBind()
I used the wizard to create my connection and set my sql statement!

When i open my server explore it tells me that i am connected
to the database and from the server explore i can edit and save any changes that i have made.
I was wondering do i have to have mdb file in a particular folder?
Example like the bin or root directory.

I don't have access so i just download the mdb file from wroxs.
Whats curious is i am able to make a connection when i just use a text editor like notepad.
Reply With Quote
  #2 (permalink)  
Old October 11th, 2003, 09:26 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Hi there,

I think this is a classic ASP forum, so you may try your luck in one of the .NET forums for similar problems in the future.

Anyway, the problem is related to permissions. When you connect to the database using the Server Explorer (I assume you're using Visual Studio .NET?) you connect under your user account which apparently has enough permissions.

At run-time, however, the web server connects to this database. The account that the web server uses is usually IUSR_MachineName where MachineName is the name of your computer. This account needs enough permissions for both the .mdb file and the folder it resides in.

To change the permissions, open a Windows Explorer, right-click C:\database, choose Properties and then on the Security tab add the IUSR_MachineName account. Make sure it has at least read and change permissions.



Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old February 5th, 2004, 02:53 PM
Authorized User
Join Date: Feb 2004
Location: Leeds, West Yorkshire, United Kingdom.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts

I also had this problem when using Dreamweaver MX, and as you say, no bother with Notepad editting & viewing in a browser, or on a remote platform.
I'm not too hot on the .Net stuff yet but certain wysiwyg environments keep hold of the connection they create whilst setting up the initial environment and whilst working with it ( if that makes sense)

Try looking in your folder where you're storing your .mdb file, if there's also a .ldb file with the same prefix, right click and send to notepad, you'll probably see that the database is opened by admin..
Save your work, close the software environment down and delete the .ldb file then try again...
Might work


Don't think, do!
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.net ASPNET user account and SQL Server databa cJeffreywang ASP.NET 1.0 and 1.1 Basics 0 March 27th, 2007 08:25 PM
visual c++ begginer.. want help anoria BOOK: Beginning Visual C++ 6 1 December 31st, 2005 02:49 PM
Problems in ASP.NET 2 when I update my ODBC databa Armando Barbarin Rionda ASP.NET 1.0 and 1.1 Professional 1 July 1st, 2005 01:20 AM
Problems in ASP.NET 2 when I update my ODBC databa Armando Barbarin Rionda ASP.NET 1.0 and 1.1 Professional 0 June 30th, 2005 05:07 PM
ASP CDO.Message difficulty crmpicco Classic ASP Basics 0 March 1st, 2005 07:48 AM

All times are GMT -4. The time now is 01:20 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.