locked
Microsoft JET Database Engine error '80004005' RRS feed

  • Question

  • User-702126004 posted

    I'm trying to read an excel file using classic ASP. I get the following error though:

    Microsoft JET Database Engine error '80004005'

    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.

    Here's my code:

    <%
    ' Set Connection Params
    Set oConn = Server.CreateObject("ADODB.connection")

    oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\excel\excel.xls;Extended Properties=Excel 8.0;"

    Set RS=Server.CreateObject("ADODB.recordset")

    ' Write the SQL Query
    RS.open "SELECT * FROM new_range", oConn

    do until RS.EOF
    Response.Write ( RS("NAME") & " -- " & RS("EMAIL") & "")
    RS.movenext
    Loop

    'Close the recordset/connection

    RS.Close
    oConn.Close
    Set RS = Nothing
    %>

    I gave the IUSR account full control over the file and the folder. But that doesnt to it :(

    Saturday, March 15, 2014 6:30 PM

Answers