HTTP 500.100 - 內部伺服器錯誤 - ASP 錯誤

2008-06-02 1:51 pm
ASP 錯誤(高手請幫手)
我開我的網頁時出現

HTTP 500.100 - 內部伺服器錯誤 - ASP 錯誤
錯誤類型:
Microsoft JET Database Engine (0x80004005)
無法指出的錯誤
login.asp, line 21

其中
*************************************************
line20 sql = "select p_id, p_name, p_isOnline, p_state from tb_person
line21 rs.open sql,conn,0,1

*************************************************

補充
*************************************************
<%
Dim conn' Connection string
conn = "provider=microsoft.jet.oledb.4.0; data source=" & server.MapPath("private.mdb")

Dim rs, sql
Set rs = server.CreateObject("ADODB.RECORDSET")
%>

*************************************************


語法上有問題嗎?? 請指教!!! Thanks

回答 (2)

2008-06-02 2:23 pm
2008-06-02 10:14 pm
Your code is correct if it is written as follows:
<%
Dim conn' Connection string
conn = "provider=microsoft.jet.oledb.4.0; data source=" & server.MapPath("private.mdb")

Dim rs, sql
Set rs = server.CreateObject("ADODB.RECORDSET")

sql = "select p_id, p_name, p_isOnline, p_state from tb_person
rs.open sql,conn,0,1
%>

0x80004005 is an unspecifed error. When used with Access database, the most common cause is that the IIS user account does not have the Modify permission to the folder where your database is located. When an Access database is opened or modified, an .ldb file (Access lock file) is created. When the IIS user account does not have the right to create the file in the folder, 0x80004005 error is the result.

Solution is to give the IIS user account, account name is iusr_servername by default, read, write and modify permission to the database folder. Also make sure that the .mdb file is not set to Open Exclusively.


收錄日期: 2021-04-26 13:18:58
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080602000051KK00359

檢視 Wayback Machine 備份