|
|
 |
| 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.
|
 |

December 14th, 2004, 10:25 PM
|
|
Registered User
|
|
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

December 15th, 2004, 05:02 AM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 685
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Do the security settings on the mdb file allow the IUSR_[machinename] user to access it?
Cheers,
Chris
|

December 15th, 2004, 01:57 PM
|
|
Registered User
|
|
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

December 15th, 2004, 02:22 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 685
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

December 15th, 2004, 03:19 PM
|
|
Registered User
|
|
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|

December 17th, 2004, 01:28 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 685
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |