asp教程添加數據庫教程記錄
<form name="form1" method="post" action="">
<label>
<input name="uid" type="text" id="uid">
</label>
用戶名
<p>
<label>
<input name="pwd" type="text" id="pwd">
</label>
密碼
<input type="hidden" name="action" value="add">
</p>
<p>
<label>
<input type="submit" name="Submit" value="增加">
</label>
</p>
</form>
<%
asp添加數據庫記錄
Dpath ="www.3lian.net/dbaseMateyDBWeb_^%$#@.mdb"
Set Conn=Server.CreateObject("Adodb.connection")
if request.QueryString("action")="add" then
Set Rs =Server.CreateObject("Adodb.Recordset")
Conn.connectionstring="Provider=Microsoft.Jet.oledb.4.0;Data source="&Server.MapPath(Dpath)
Conn.open
Dim sql
sql ="select * from test "
rs.open sql,conn,1,3
rs.addnew
rs("uid")=request("uid")
rs("pwd")=request("pwd")
rs.update
response.Write("數據保存成功")
end if
%>