lothos12345 Posted July 4, 2003 Posted July 4, 2003 I have a question I am trying to access a Microsoft Access database using VB.NET Webforms but I am still getting an error. I am trying to access the database using the same controls that I do when I access them when creating a Windows Application. When I do it using a windows application it works however when I try to create a Web Application following the same steps its not working. If anyone could help me by sending sample code of how to access a Microsoft Access database in a Web Application I would greatly appreciate it. Quote
Moderators Robby Posted July 5, 2003 Moderators Posted July 5, 2003 What does your connection string look like? Quote Visit...Bassic Software
lothos12345 Posted July 5, 2003 Author Posted July 5, 2003 (edited) My connection string looks like: Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=C:\Documents and Settings\jgonzales\My Documents\Nissan.mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False I used the built in Wizard to connect to the Access Database. [edit]removed smilies[/edit] Edited July 6, 2003 by Robby Quote
Mehyar Posted July 7, 2003 Posted July 7, 2003 I tried the built in wizard in Windows forms and it worked great, but it caused problems in WebForms. What you can do is declare the connection object in code and give it the connection string(the same as the one from the wizard) Quote Dream as if you'll live forever, live as if you'll die today
Moe Tarhini Posted July 9, 2003 Posted July 9, 2003 You must give the user ASPNET read write permissions on the databse itself. Because in windows forms you are accessing the databse using the login user account while in asp.net you are browsing the net using the ASPNET user. so please give this user the correct permissions and it will work for sure. Quote
lothos12345 Posted July 9, 2003 Author Posted July 9, 2003 Thanks Thank you very much for the help your suggestions worked great. Quote
Spektre Posted October 9, 2003 Posted October 9, 2003 what helped? OK, I am running into this problem as well and I did not understand the suggestions. I am developing a Webform to access an MS ACCESS database. I get the "another user has opened exclusively or you do not have permission" error webpage. 1. Can you really not use the connection string attached to an object? Must you copy it into your code? Seems strange. 2. How do I give permissions to user ASPNET? Going into the database and adding a user named "ASPNET" and giving them all the permissions didn't do anything. Thanks, Spektre Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.