asp教程 +access 数据保存插入代码
if request.QueryString("ag") then
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("../skyj.mdb")
ag=request.form("ag")
amount=request.form("amount")
name2=request.form("name")
tel=request.form("tel")
email=request.form("email")
QQ=request.form("QQ")
bolg=request.form("bolg")
blank=request.form("blank")
exec="insert into 订单(订单,数量,人名,电话,Email,QQ,博客,银行卡号)values('"+ag+"','"+amount+"','"+name2+"','"+tel+"','"+email+"','"+QQ+"','"+bolg+"','"+blank+"')"
conn.execute exec
conn.close
set conn=nothing
end if
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.3lian.net/1999/xhtml">
<html>
<head>
<title>asp +access 数据保存插入代码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="../05-17/example5.asp">
<table width="70%" border="0">
<tr>
<td>产品
<input type="text" name="ag" value=""> </td>
<td>数量 (斤)
<input type="text" name="amount" value=""></td>
<td>姓名
<input type="text" name="name" value=""></td>
<td>电话
<input type="text" name="tel" value=""></td>
<td>Email
<input type="text" name="email" value=""></td>
<td>QQ
<input type="text" name="QQ" value=""></td>
<td>博客<input type="text" name="bolg" value=""></td>
<td>银行卡号<input type="text" name="blank" value=""></td>
</tr>
</table>
<br>
<br>
<br>
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</form>
<br>
</body>
</html>