我佛山人,您好!我用DW编写的asp程序
原来运行正常(如http://127.0.0.1/lxwj/read.asp?file_ID=40),可至系统重新安装WinXP并升级到SP2后就出错,信息如下:
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务
错误类型:
Microsoft JET Database Engine (0x80004005)
操作必须使用一个可更新的查询。
/lxwj/read.asp, 第 38 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
网页:
GET /lxwj/read.asp
时间:
2004年10月28日, 14:33:52
程序部分如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/fileconn.asp" -->
<%
if(Request.QueryString("file_ID"
<> ""
then Command1__MMid = Request.QueryString("file_ID"
%>
<%
Dim rs__MMColParam
rs__MMColParam = "1"
If (Request.QueryString("file_ID"
<> ""
Then
rs__MMColParam = Request.QueryString("file_ID"
End If
%>
<%
Dim rs
Dim rs_numRows
Set rs = Server.CreateObject("ADODB.Recordset"
rs.ActiveConnection = MM_fileconn_STRING
rs.Source = "SELECT file_Content, file_ID, file_img, file_Name, file_Number, file_ReadDegree, file_Whether FROM file_depot WHERE file_ID = " + Replace(rs__MMColParam, "'", "''"
+ " AND file_Whether = True ORDER BY file_ID DESC"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()
rs_numRows = 0
%>
<%
set Command1 = Server.CreateObject("ADODB.Command"
Command1.ActiveConnection = MM_fileconn_STRING
Command1.CommandText = "UPDATE file_depot SET file_ReadDegree =file_ReadDegree+1 WHERE file_ID =" + Replace(Command1__MMid, "'", "''"
+ ""
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
(第 38 行)Command1.Execute()
%>
......
(0x80004005)类型错误解释:
MicrosoftOLEDBProviderforODBCDrivers(0x80004005)-->sql语句出错(要插入或更新的字段的数值不能为空值
请求您解决以下,谢谢!