<%
name=request.form("name")
com=request.form("com")
add=request.form("add")
pc=request.form("pc")
tel=request.form("tel")
fax=request.form("fax")
nail=request.form("mail")
net=request.form("net")
order=request.form("order")
mess=request.form("mess") '刚才你把这去了,怎么还能取到值?
if pc="" then pc=0
if tel="" then tel=0
if fax="" then fax=0 '这三个是数值型的,如果没有取到值就给它设为0
set conn=server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("guestbook.mdb")& ";Persist Security Info=False;"
set rs=server.createobject("adodb.recordset")
sql="select * from guestbook"
rs.open sql,conn,3,2
rs.addnew
rs("name")=name
rs("com")=com
rs("add")=add
rs("pc")=pc
rs("tel")=tel
rs("fax")=fax
rs("mail")=mail
rs("net")=net
rs("order")=order
rs("mess")=mess
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "记录添加成功!"
%>
把这一页改成这样吧
还