错误类型:
Microsoft JET Database Engine (0x80040E21)
索引或主关键字不能包含一个 空 (Null) 值。
/cm/html/addcontractconsignment.asp, 第 37 行
- 浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; TencentTraveler )
联接数据库部分代码:
<%
set Conn=server.createobject("adodb.Connection")
conn.open="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("../datasource/datasource.mdb")
set rs=server.createobject("adodb.recordset")
function connClose
Conn.close
Set conn = Nothing
End Function
function errmsg(message)
session("err")=message
response.redirect"err.asp"
End Function
%>
网页执行代码:
<%
if request("hiddenField")<>"" then
function k(str,name,size)'isSize
if len(str)>size then
call errmsg(name&"字符宽度不能大于"& size)
end if
end function
TheContractNo=k(request("ContractNo"),"合同编号",15)
TheSignedDate=k(request("SignedDate"),"签约日期",8)
...............
Sql="Select * from ContractM"
Rs.open Sql,Conn,1,3
Rs.addnew
Rs("ContractNo")=TheContractNo
Rs("SignedDate")=TheSignedDate
Rs.update(出错部分)
Rs.close
Response.redirect"home.asp"
Response.end
End if
%>
邮箱: willianwu@21cn.net 18289842 谢谢!