Knight Data Access Layer
Truncating Table VB.NET
Basic Tasks VB.NET > Database Commands > Truncating Table VB.NET

Truncating a table will delete all the records in a table.

 

'Get the current instance of the helper

Dim db As IDataHelper = DataHelper.SessionFactory()

 

db.TruncateTable(Of SalesPeople)()

 

OR

 

db.TruncateTable("Person")