I have to clear out all old records from multiple MS Access tables each time my program begins (clearing out the data from the last run).
Each table can have as many as 15000 rows and the method I am using now is quite slow. Is there a better way to clear out the table than deleting one row at a time as I am doing in the code below?
Here's my code:
Dim conn As New OleDbConnection(constr)
Dim qry As String = "SELECT * FROM Measurement"
Dim daTestTbl As New OleDbDataAdapter(qry, conn)
Dim cbTestTbl As New OleDbCommandBuilder(daTestTbl)
Dim dtTestTbl As New DataTable()
For Each dr As DataRow In dtTestTbl.Rows
Catch ex As Exception
MsgBox(ex.Message, vbOKOnly, "Clear Measurement Table!")
That's another topic - and one I am interested in. I was going to search to see if there was a command for compacting the database from VB.Net.