ASP Tutorial Add Database Tutorial record
<form name= "Form1" method= "Post" action= ""
<label>
<input Name= "UID" type= "text" id= "UID"
</label>
User name
<p>
<LABEL>
<input name= "pwd" type= "text" id= "pwd"
</ Label>
Password
<input type= "hidden" name= "action" value= "add"
</p>
<P>
<label>
<input type= "Submit" name= "Submit" Value= "Add"
</label>
</p>
</form>
<%
ASP Add database records
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
&nb sp; rs.addnew
rs ("UID") =request ("UID")
RS ("pwd") =request ("pwd")
Rs.update
response. Write ("Data saved successfully")
End If
%>