EagleEyeVB
New member
- Joined
- Aug 28, 2005
- Messages
- 4
- Programming Experience
- Beginner
Hi, I'm new to VB.NET and am trying to write code to delete all the records in a temp table.
Here's what I have, but the code doesn't work. Any help will be appreciated. Thanks!
Dim connAccess As OleDbConnection
Dim da As OleDbDataAdapter = New OleDbDataAdapter
Dim cmd As OleDbCommand
Dim strConn As String
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" _
"Data Source = tempTable.mdb"
connAccess = New OleDbConnection(strConn)
' Create the SelectCommand.
cmd = New OleDbCommand("DELETE FROM tempTable")
da.DeleteCommand = cmd
Here's what I have, but the code doesn't work. Any help will be appreciated. Thanks!
Dim connAccess As OleDbConnection
Dim da As OleDbDataAdapter = New OleDbDataAdapter
Dim cmd As OleDbCommand
Dim strConn As String
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" _
"Data Source = tempTable.mdb"
connAccess = New OleDbConnection(strConn)
' Create the SelectCommand.
cmd = New OleDbCommand("DELETE FROM tempTable")
da.DeleteCommand = cmd