VB Delete records from mdb tables
Posted on 2012-03-13
I am trying to delete data containted in two tables within my windows application using vb. Here is the code I have so far...
Dim DBName As String = "Time & Pay.mdb"
Dim conn As New System.Data.OleDb.OleDbConnection()
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & GetPath() & "\" & DBName
If System.IO.File.Exists(DBName) Then
If conn.State = ConnectionState.Closed Then
Dim strDelete As String = "DELETE * FROM Hours"
strDelete = "DELETE * FROM Tips"