Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting Records
Message
From
12/10/2002 01:14:58
 
 
To
11/10/2002 23:31:42
General information
Forum:
Visual Basic
Category:
Access
Miscellaneous
Thread ID:
00710594
Message ID:
00710602
Views:
15
>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
Map
View

Click here to load this message in the networking platform