Click to See Complete Forum and Search --> : Problem Access a MS Access Database from a webform
flappie
March 3rd, 2003, 11:49 PM
I have created a web page to pull info from an access database and then display it in a datagrid. I have followed the usual procedures, by creat the OleDbConnection / OleDBDataAdapter / the DataSet and link that to the datagrid
However when I run the page I get an error saying that the permissions are incorrect or that the database is already open in exclusive mode.
I have checked the following:
1. The database is not read only
2. I have ensured that no other programs are running to use the database
3. I have not created a password for the file, and when I Test Connection it comes back as successful.
Any help will be appreciated.
riteshtandon
March 4th, 2003, 12:05 AM
well its little unclear without the code, but what is think is happening
is that the connection to the database is failing,
either due to the connection provider properties or some security policies.
Try to use OLE db provider and using a data environment
Ritesh
Sonu Kapoor
March 4th, 2003, 08:15 AM
please give us some code...
-Sonu
guyute618
March 4th, 2003, 02:08 PM
MS Access creates a file called yourdatabase.ldb i believe. If you have connected to your database previously and not correctly closed the connection, often times this file isn't allowed to close. When it is open trying to re-connect to the database can be screwy. It should automatically close after a certain amount of time. check to see if a .ldb file has been created on your server.
this may be a simple answer.
guyute618
flappie
March 4th, 2003, 02:13 PM
Thank you for the reply. I have looked for that file, and it is not there. The connection I hae created works in the Windows form, but not with the asp.net form. So I will post the code I did for the ASP for up here shortly. Hopefully that will provde more info on where I am going wrong. Thanks in any case for your assistance so far.
flappie
March 6th, 2003, 05:22 AM
Thanks to all those willing to help. The problem was that I had not assigned specific permissions to the aspnet account on my computer.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.