Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting Records
Message
 
À
11/10/2002 23:31:42
Information générale
Forum:
Visual Basic
Catégorie:
Access
Divers
Thread ID:
00710594
Message ID:
00710602
Vues:
16
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform