Friday, December 14, 2007

How to delete all records by using SQL?

How to delete all records by using SQL?

All records can be deleted by using SQL commands.

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")

conn.execute "DELETE * FROM Member" 'When we didn't set any rules, the DELETE command will delete all record in the table

conn.Close

Set conn = Nothing

%>

No comments: