Jump to content
Xtreme .Net Talk

Boomstar

Members
  • Posts

    1
  • Joined

  • Last visited

Boomstar's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hey, thanks for the nice tutorial, it helped me with the inserting but I'm having a problem with deleting records. I try to use this code with a button Private Sub cmdClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClear.Click Dim MyDel As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\reports.mdb") MyDel.Open() Dim MyCommand As New OleDbCommand("DELETE FROM Records WHERE f14 = 1", MyDel) Try MyCommand.ExecuteNonQuery() MsgBox("Works", MsgBoxStyle.Information, "Works") Catch ex As Exception MsgBox("Error in Clearing Memory", MsgBoxStyle.Information, "Error") End Try MyDel.Close() MyCommand.Dispose() End Sub Whenever I execute this code, I just get the error message, am I forgetting to do somtething here, any help would be greatly appriciated, thanks.
×
×
  • Create New...