How to update record by using SQL Command?
We can update the record by using SQL command.
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= "UPDATE Member SET Location = 'AU' WHERE MemberName='Jack'"
'Update the Location to "AU" when the member name is Jack
conn.Execute strSQL
conn.Close
Set conn = Nothing
%>
No comments:
Post a Comment