How to add a new record by using SQL?
We can use the SQL command to add a new record.
The ASP codes are written and described as below:
<%
Set conn = Server.CreateObject("Adodb.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("db1.mdb")
strSQL = "INSERT INTO Member " & _
"(MemberName, Location) " & _
"Values('Alvin', 'UK')"
conn.execute strSQL
Set conn = nothing
%>
No comments:
Post a Comment