The Microsoft Jet database engine cannot open the file

Discussion in 'ASP .Net' started by Morten Wennevik, Oct 31, 2005.

  1. I'm transferring an Excel file from a client computer to a web-page on a
    server, then trying to open the file on the server causes this exception
    message to occur.

    The Microsoft Jet database engine cannot open the file ''. It is already
    opened exclusively by another user, or you need permission to view its data.

    I open the file using this connection string

    Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source={0};Extended Properties=" & Convert.ToChar(34).ToString() & "Excel
    8.0;HDR=No" & Convert.ToChar(34).ToString()

    The file is put into the ASPNET temp folder and the ASPNET account has full
    control over that folder, but no matter where I put the file, or even if I
    set Everyone to full control on the file, the jet engine still fails.

    The Microsofts KB article on the error refers to the web guest account, but
    I am unable to set user permissions for this user (IUSR_<machine>) as it
    does not seem to exist.

    Any suggestions?


    Morten
     
    Morten Wennevik, Oct 31, 2005
    #1
    1. Advertising

  2. Nevermind :p

    If you look closely, the Data Source={0} which was supposed to be set using
    String.Format before opening the connection.



    "Morten Wennevik" <> wrote in message
    news:%...
    > I'm transferring an Excel file from a client computer to a web-page on a
    > server, then trying to open the file on the server causes this exception
    > message to occur.
    >
    > The Microsoft Jet database engine cannot open the file ''. It is already
    > opened exclusively by another user, or you need permission to view its
    > data.
    >
    > I open the file using this connection string
    >
    > Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source={0};Extended Properties=" & Convert.ToChar(34).ToString() & "Excel
    > 8.0;HDR=No" & Convert.ToChar(34).ToString()
    >
    > The file is put into the ASPNET temp folder and the ASPNET account has
    > full control over that folder, but no matter where I put the file, or even
    > if I set Everyone to full control on the file, the jet engine still fails.
    >
    > The Microsofts KB article on the error refers to the web guest account,
    > but I am unable to set user permissions for this user (IUSR_<machine>) as
    > it does not seem to exist.
    >
    > Any suggestions?
    >
    >
    > Morten
    >
     
    Morten Wennevik, Oct 31, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGF2ZQ==?=

    The Microsoft Jet database engine cannot open the file

    =?Utf-8?B?RGF2ZQ==?=, Aug 3, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    976
    =?Utf-8?B?RGF2ZQ==?=
    Aug 5, 2005
  2. =?Utf-8?B?TmVhbA==?=
    Replies:
    3
    Views:
    41,729
    Paul Clement
    Sep 2, 2005
  3. mamin
    Replies:
    1
    Views:
    3,467
    elcon
    Jul 28, 2010
  4. Jas
    Replies:
    1
    Views:
    974
    Patrice
    Jan 25, 2010
  5. snazzy
    Replies:
    2
    Views:
    267
    Bob Barrows [MVP]
    Nov 7, 2008
Loading...

Share This Page