>Hi,
>
>Does VB have some method to delete all the records inside a table Like "Zap" for DBF database?
>
>Wai
This depends upon the database you are using.
I know of several methods, but each depends on the database and other factors. All methods require an ADO or DAO connection and either a Command object or a Recordset object, although a Command object would be more appropriate.
I will assume a command object and just deal with the SQL statements.
Microsoft Access: DELETE * FROM TABLE_NAME
SQL Server Method 1: DELETE FROM TABLE_NAME (I think this method can be used with any ODBC compliant DB, comments anyone?)
SQL Server Method 2: TRUNCATE TABLE TABLE_NAME
Hope this helps.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only