是数据库问题吗?

muqun 2003-08-24 05:00:43
当我向表单写内容时。如果某一项没写数值便会出现联接错误。
我的表单的字段都是设为备注型的。
以下为保存的代码。

<!--#include file="conn.asp"-->
<%
dim id
dim company
dim addes
dim tel
dim http
dim fax
dim uong
dim aboutandww
dim movetel
dim firsttime
dim repotfistime
dim requitone
dim towtime
dim retow
dim requitow
dim firspice
dim leo
dim rs
dim sq1
%>
<%
id=request.form("id")
company=request.form("company")
addes=request.form("addes")
http=request.form("http")
tel=request.form("tel")
fax=request.form("fax")
uong=request.form("uong")
aboutandww=request.Form("aboutandww")
movetel=request.form("movetel")
firsttime=request.form("firsttime")
repotfistime=request.form("repotfistime")
requitone=request.form("requitone")
towtime=request.form("towtime")
retow=request.form("retow")
requitow=request.form("requitow")
firspice=request.form("firspice")
leo=request.form("leo")

set rs=server.createobject("adodb.recordset")
sql="select * from com "
rs.open sql,conn,1,3

rs.addnew
rs("company")=company
rs("addes")=addes
rs("tel")=tel
rs("fax")=fax
rs("http")=http
rs("uong")=uong
rs("aboutandww")=aboutandww
rs("movetel")=movetel
rs("firsttime")=firsttime
rs("repotfistime")=repotfistime
rs("requitone")=requitone
rs("towtime")=towtime
rs("retow")=retow
rs("requitow")=requitow
rs("firspice")=firspice
rs("leo")=leo
rs.update

rs.close
set rs=nothing
conn.close
set conn=nothing
%>
...全文
26 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
spiketang 2003-08-24
  • 打赏
  • 举报
回复
up
guoyan19811021 2003-08-24
  • 打赏
  • 举报
回复
同意楼上!
citylamp 2003-08-24
  • 打赏
  • 举报
回复
可能是你在设计数据库时,每一项都设为了“不可为空”。

16,553

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧