p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 14th, 2004, 10:25 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old December 15th, 2004, 05:02 AM
Friend of Wrox
Points: 1,374, Level: 14
Points: 1,374, Level: 14 Points: 1,374, Level: 14 Points: 1,374, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 685
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Cheers,

Chris



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old December 15th, 2004, 01:57 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old December 15th, 2004, 02:22 PM
Friend of Wrox
Points: 1,374, Level: 14
Points: 1,374, Level: 14 Points: 1,374, Level: 14 Points: 1,374, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 685
Thanks: 0
Thanked 0 Times in 0 Posts
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old December 15th, 2004, 03:19 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
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?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old December 17th, 2004, 01:28 PM
Friend of Wrox
Points: 1,374, Level: 14
Points: 1,374, Level: 14 Points: 1,374, Level: 14 Points: 1,374, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 685
Thanks: 0
Thanked 0 Times in 0 Posts
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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Jet connection problem istcomnet BOOK: Beginning ASP 3.0 1 November 6th, 2008 03:47 PM
Request Code Execution Permission Problem dparsons C# 0 May 14th, 2007 10:28 AM
sqlstate code for Jet Provider khng ASP.NET 1.1 0 April 6th, 2005 07:59 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 04:10 AM



All times are GMT -4. The time now is 05:56 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc