asp 写入数据库问题
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<%
sub putin()
set conn=server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("client.mdb")
set rs=Server.createobject("adodb.recordset")
rs.open"select * from userinfo",conn,1,2
rs.addnew
rs("surname")=request("surname")
rs.update
rs.close
conn.close
set rs=nothing
set conn=nothing
end sub
%>
</head>
<body>
<input name="btn1" type="button" value=" 提交 " onClick="call putin">
</body>
</html>
点击“提交”按钮,数据没有写入数据库!怎么回事?高手教一下
如果删除 sub putin()和end sub 两句,数据库写入正常,当然“提交”无用了,ft啊!