Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 December 14th, 2004, 10:25 PM
Registered User
 
Join Date: Dec 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Griffinite
Default Permission Request from Microsoft Jet Provider


I am writing a program for the web and need to connect to a Microsoft Access Database file on my computer. Then be able to display it in a datagrid.

I created a connection using the OLEConnection control. Then I created an OLEDataAdapter control using the connection i just made. Then using the OLEDataAdapter CreateDataSet wizard i created a DataSet control named Model1. On the page i have just a DataGrid named DataGrid1. I bound the datasource of the grid to the DataSet.

Within the code editor i wrote the following within the Page_Load event
        If Not Page.IsPostBack Then
            OleDbDataAdapter1.Fill(Me.Model1)
            DataGrid1.DataBind()
        End If
I recieve an error on the "OleDbDataAdapter1.Fill(Me.Model1)" line saying "The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\Justin G\Desktop\compile folder Master\Seal-Finder Spider\Seal-Finder Spider DB.mdb'. It is already opened exclusively by another user, or you need permission to view its data. "

I've gone round and round with this trying to give permission to the OleDb Driver but nothing is working.

Any help is much appreciated.
Thank You

Griffinite
 
Old December 15th, 2004, 05:02 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Do the security settings on the mdb file allow the IUSR_[machinename] user to access it?

Cheers,

Chris



 
Old December 15th, 2004, 01:57 PM
Registered User
 
Join Date: Dec 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Griffinite
Default

I would assume so. I can open the database using VB.Net ADO control. And when i set up the Adapter for the dataset I was able to test the connection and it was able to fill the dataset within the Preview Data program. But when I try to fill the dataset in run time it gives me an error.

Where would i check to see if my machine is allowed access. I looked in the security setings but only found users and workgroups. I couldn't find anything resembling the IUSR format

 
Old December 15th, 2004, 02:22 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

On the security settings tab of the .mdb properties dialogue there is a list of group or user names, if you can't see IUSR_[machinename], add it using the add button and subsequent dialogues.
Grant the account required permissions on the .mdb file

HTH,

Chris

 
Old December 15th, 2004, 03:19 PM
Registered User
 
Join Date: Dec 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Griffinite
Default

I created the new machine user within the tool_security_user and group accounts. Then gave the user all the permissions within the tools_security_user and group permissions. But when try to make the connection using this User ID instead of Admin for the user ID input in the Connection Wizard, I get an error saying

   "Test connection faild because of an error in initializing provider. Cannot start your application. The workgroup information file is missing or opened exclusivly by another user."

If I put in a blank user name the test will connect successfuly and if I put "Admin" for the User ID the test will work. If i use "Admin" for the user name the configuration works and generates all the SQL commands (Update, Select,...). Then Im able to create a DataSet from the Adapter and In the Adapter the dataset will fill using the preview command. But when I run it in Veiw Browser for the form I get the envatable Error requestin Permission or the file is opened exclusively by another user.

Is there a better way of going about this instead of using the connection, adapter and dataset controls?

 
Old December 17th, 2004, 01:28 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can create the permissions for the file in windows explorer via it's context menu, this allows the file to be accessed via the internet guest account that web visits use by default - the user will already exist if you have IIS installed, so you don't need to create it.

The username & password in your connection do not need to be changed.

The controls you are using are fine, you just need to allow access to the file.

HTH,

Chris








Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Jet connection problem istcomnet BOOK: Beginning ASP 3.0 3 February 27th, 2013 09:31 AM
Request Code Execution Permission Problem dparsons C# 0 May 14th, 2007 09:28 AM
Microsoft JET Database Engine (0x80040E14) HaverkPJ Classic ASP Databases 2 November 16th, 2004 11:25 PM
'Microsoft.Jet.OLEDB4.0' provider not registere satyag ASP.NET 1.x and 2.0 Application Design 5 June 17th, 2004 03:10 AM





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