Knight Data Access Layer
Execute Non Query VB.NET
Basic Tasks VB.NET > Database Commands > Execute Non Query VB.NET

Any SQL command can be run simply by passing in a SQL statement.

 

'Get the current instance of the helper

Dim db As IDataHelper = DataHelper.SessionFactory()

 

Dim affectedRecords As Integer = db.ExecuteNonQuery("DELETE FROM LOG WHERE LOG_DATE < '2012/06/06'")