Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 20th, 2004, 10:11 PM
Registered User
 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default OleDbException (0x80004005):

Hi all,
I am trying to figure out what I am doing wrong. No matter what I try, I can not get past the following error.

OleDbException (0x80004005): The Microsoft Jet database engine cannot open the file It is already opened exclusively by another user, or you need permission to view its data.

Any help would be appreciated

Thanks,
Gary

 
Old April 21st, 2004, 06:16 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you trying to test a page while you have the database open in Access?
 
Old April 21st, 2004, 09:12 AM
Registered User
 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Planoie,

No, and this happens to SQL d-bases as well

Gary

 
Old April 21st, 2004, 09:18 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Huh... now that IS odd.

I haven't worked with anything but MSSQL for the most part so anything else I say would just be a guess.

Are you connecting to SQL via JET?
 
Old April 21st, 2004, 09:56 AM
Registered User
 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, String for SQL d-bases is as follows:
Provider=MSDASQL.1;Extended Properties="DBQ=C:\Senior Project\LibraryCentral.mdb;DefaultDir=C:\Senior Project;Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common Files\ODBC\Data Sources\LibraryCentral.dsn;MaxBufferSize=2048;MaxS canRows=8;PageTimeout=5;SafeTransactions=0;Threads =3;UID=admin;UserCommitSync=Yes;"
________________________________________________

Also... This only happens when I try and connect using a web form ... I can sucessfully attach when I am usinf a Windows form.

Thanks,
Gary


 
Old April 21st, 2004, 11:18 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

That connection string is pretty confusing. You are connecting to SQL? Where is the SQL information?

A standard .net connection string for use by the SqlClient.Connection object usually looks like this:
Data Source=servername;Initial Catalog=databasename;User Id=sa;Password=asdasd;
(http://www.connectionstrings.com)
 
Old April 21st, 2004, 12:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

It appears to be a permissions issue.

"or you need permission to view its data."

 
Old April 21st, 2004, 02:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Do you see an .ldf or .ldb file in the same folder as the access database? This is the locking file which means some process or user has this file locked. If not, you shouldn't have any database problems, and maybe this is permissions then.

Also, you shouldn't have locking issues with locking unless you specify it in the query, specify it in a setting, or use Access to connect to SQL.

Hope this helps,

Brian
 
Old April 21st, 2004, 08:19 PM
Registered User
 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks guys,

It does seem to be a permissions issue but I'm not sure what to do to correct this. Any Suggestions?

Thanks,
Gary

 
Old April 21st, 2004, 08:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Either the ASPNET account or possibly whatever user permissions is specified directly in the database.





Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Data.OleDb.OleDbException: No value given f tjgrindsted ASP.NET 2.0 Basics 0 January 24th, 2007 07:25 AM
[OleDbException (0x80004005): IErrorInfo.GetDescri vandat ASP.NET 1.0 and 1.1 Basics 5 January 8th, 2007 12:16 PM
System.Data.OleDb.OleDbException: Expected query n Thac Classic ASP Databases 0 July 3rd, 2005 01:48 PM





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