CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2003
    Location
    RSA
    Posts
    16

    Angry Problem Access a MS Access Database from a webform

    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.

  2. #2
    Join Date
    Feb 2003
    Location
    Hyderabad
    Posts
    181
    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

  3. #3
    Join Date
    Dec 2001
    Location
    Canada/Montreal
    Posts
    983
    please give us some code...

    -Sonu
    Sonu [MVP, MCAD.NET]
    Website: http://DotNetSlackers.com

  4. #4
    Join Date
    Feb 2003
    Posts
    8
    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

  5. #5
    Join Date
    Mar 2003
    Location
    RSA
    Posts
    16
    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.

  6. #6
    Join Date
    Mar 2003
    Location
    RSA
    Posts
    16

    Thanks Guys

    Thanks to all those willing to help. The problem was that I had not assigned specific permissions to the aspnet account on my computer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured