I recently upgraded my computer host and bought it on Taobao. The seller installed me with 64-bit win7 and some basic programs.
I have a mini program that is asp, so I installed IIS (I used to add and delete programs, but now I'm calling it to turn on or off the Windows function. I searched for a while). After setting up the web, I found that it was running all the time, and the page was blank.
I haven't touched the Asp program for a long time, but I still have some impression. So I opened the program and found the section connecting to the database, and added: Response.Write Err.Description. The prompt was not recorded, probably because I did not find a suitable application.
I looked at the machine and found word, excel, etc., but no access. Reinstalled office2003 and got access.
The web is running, prompt: The provider is not found. The program may not be installed correctly.
Original program
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(AccessPath&"/"&AccessFile)
Conn.Open
I changed it to:
Conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(AccessPath&"/"&AccessFile)&";"
Tip: [Microsoft][ODBC Driver Manager] No data source name was found and the default driver was not specified
In the past experience, the parent path may not be enabled, so I found it in IIS to enable it, but it is still the same.
After searching, I found that the problem was on IIS7.
In the default settings of the application pool, the default settings are False to True.
At this time, prompt:
The former: Unspecified error database connection error, please check the connection string
The latter: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(Unknown)'. It has been opened exclusively by other users or does not have permission to view data.
Continue to find a solution:
The windows/temp folder lacks a user group permission, and the missing user group is Authenticated Users.
So add the Authenticated Users user group to this folder, giving read and write permissions.
The problem has been solved!
'Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] File '(Unknown)' not found.
/conn/conn1.asp, line 3'
The configuration of IIS7.0 is correctly set in Windows 7, and ASP is correctly set in the same time
The permission problem will pop up as above when running!
My database connection code is:
The code copy is as follows:
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & DefaultDir &server.mappath("worker.mdb")&";"
Set rs = Server.CreateObject("ADODB.Recordset")
Set rs1 = Server.CreateObject("ADODB.Recordset")
Set rs2 = Server.CreateObject("ADODB.Recordset")
Set rs3 = Server.CreateObject("ADODB.Recordset")
%>
There are many versions of explanations circulating on the Internet, and I have tried to solve them:
The windows/temp folder is missing a user group permission
Generally, in IIS installed by default in Windows 7, the missing user group is Authenticated Users
Add to
Authenticated Users