Results 1 to 3 of 3

Thread: Connection with MS-Access

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    Connection with MS-Access

    I have made connection with MS-Access

    OleDbConnection cn = new OleDbConnection();
    cn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Path:\\File.mdb";
    cn.Open();
    Response.Write(cn.State);

    Now if I run from localhost works fine. However if I run it from IIS geberates an error:

    Server Error in '/Comp' Application.
    --------------------------------------------------------------------------------
    Could not use ''; file already in use.

    What should I do?

    Pls: The connection is working for MS SQL server

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: Connection with MS-Access

    From memory this error is usually caused by a lack of permissions on the .mdb file. Is the file in the App_Data folder and what permissions does asp.net have on this folder.

    You could google your error ....... Could not use ''; file already in use.

  3. #3
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: Connection with MS-Access

    you mab need to Impersonate user in web.config file

    Code:
    <identity impersonate="true" userName="domain\user" password="password" />
    __________________
    Rate the posts that helped you

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