我在测试程序时,有如下错误,第一次见到,不知道何为,望高手赐教
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]无法将 NULL 值插入列 '编号',表 'www_wodedu_com.web133079.副综合信息表';该列不允许空值。INSERT 失败。
/huqy/trade/readtrade.asp,行68
相应的代码如下:在*号中间的就是错误所在行
1<style>
2<!--
3.td1234 { border: #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
4
5\-->
6</style>
1
2if session("membercode")<>"" then
3viewconfine "商业机会",session("membercode")
4
5dim nowtime
6nowtime=year(date)&"-"&month(date)&"-"&day(date)
7set viewcount=conn.execute("select 浏览次数 from 浏览控制表 where 会员代码='"&session("membercode")&"' and 浏览类别='商业机会' and 浏览日期='"&nowtime&"'")
8set payinfo=conn.execute("select 收费状态 from 会员库 where 会员代码='"&session("membercode")&"'")
9if not viewcount.eof then
10if (viewcount("浏览次数")>=1) then
11if isnull(payinfo("收费状态")) or trim(payinfo("收费状态"))<>"yes" then
1<script lnguage="javascript">
2<!--
3alert("对不起,您今天的浏览量已满.要想查看更多信息,请成为我们的付费会员.");
4window.location.href="../jfdz.htm"
5//-->
6</script>
1
2end if
3end if
4end if
5set payinfo=nothing
6set viewcount=nothing
7end if
8
9session("tradebh1")=request.querystring("tradebh")
10If session("tradebh1")="" Then
11Response.Write "对不起,该信息不存在!"
12Else
13set rstrade=server.createobject("ADODB.recordset")
14SQLSTR="SELECT * from 商业机会 where 编号='"&session("tradebh1")&"' order by 编号 DESC"
15rstrade.open sqlstr,conn,3
16IF rstrade.EOF Then
17Response.Write "对不起,该信息不存在!"
18Else
19
20If session("membercode")<>"" then
21IF rstrade("会员代码")<>session("membercode") then
22if rstrade("点击").actualsize=0 then
23conn.execute "update 商业机会 set 点击=1 where 编号="&request("tradebh")&""
24else
25clk=Cint(rstrade("点击"))+1
26sqlclick="Update 商业机会 Set 点击="&clk&" Where 编号="&request("tradebh")&""
27conn.execute sqlclick
28end if
29End if
30If rstrade("会员代码").actualsize<>0 and rstrade("会员代码")<>session("membercode") then
31rq=year(date)&"-"&month(date)&"-"&day(date)
32txtbh=session("tradebh1")
33txtfbdm=rstrade("会员代码")
34txtlldm=session("membercode")
35txtzhlb="商业机会"
36txttjlb="浏览"
37End IF
38sql="Insert Into 副综合信息表(主会员代码,副会员代码,综合类别,统计类别,信息编号,时间) values('"+txtfbdm+"','"+txtlldm+"','"+txtzhlb+"','"+txttjlb+"','"+txtbh+"','"+rq+"')"
39*****conn.execute (sql)********
40Else
41if rstrade("点击").actualsize=0 then
42conn.execute "update 商业机会 set 点击=1 where 编号="&request("tradebh")&""
43else
44clk=int(rstrade("点击"))+1
45sqlclick="Update 商业机会 Set 点击="&clk&" Where 编号="&request("tradebh")&""
46conn.execute sqlclick
47end if
48end if
1<script language="javascript"></script>