注册 登录
编程论坛 ASP技术论坛

怎么会有些数据写不进数据库(粗体表示的)

eournet 发布于 2010-05-22 21:47, 692 次点击
<%
sql="select * from [huiyuan]"
set rs = server.createobject("ADODB.RecordSet")
rs.open sql,conn,1,3
if nowdanwei=110 then
rs.close
set rs = nothing
end if
if nowdanwei=109 then
rs.addnew
rs("username") = nowtitle
rs("xinbie") = nowxinbie
rs("tel") = nowtel
rs("address") = nowguige
rs("card") = nowhuohao
rs("id_zu") = nowid_zu
rs.update
rs.close
set rs = nothing
end if
%>
4 回复
#2
icecool2010-05-22 23:05
与入数据库前先查看一下这几个变量有没有得到提交的数据?

看一下数据类型是否匹配?
#3
eournet2010-05-22 23:12
能否请老师详细说下,我不是很明白,我的水平也检查不出问题来
#4
yxrectangle2010-05-24 18:02
检查数据类型吧,我想2楼的意思就是说数据类型不符吧。就像你只能写入的是数字,但是你却输入了英文。
如果实在不行就用sql语句把。用conn.execute("insert into……")
#5
2010-05-25 10:03
恩,我想也是了,
应该是类型不对,
检查看一下。
1