The Microsoft Jet database engine cannot open the file

M

Morten Wennevik

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
 
M

Morten Wennevik

Nevermind :p

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top