Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/10/2012, 18:19
mrprogman
 
Fecha de Ingreso: junio-2011
Mensajes: 329
Antigüedad: 12 años, 10 meses
Puntos: 2
Sintaxis delete acces & VB.NET

Alguien sabe cual esa la sintaxis corecta para borrar un registro de una tabla acces desde codigo..?

Tengo el siguiente codigo pero me marca error

Dim Cmd12 As OleDbCommand
Dim SQL12 As String
Dim objCmd12 As New OleDbCommand
Dim Con12 = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0 ;Data Source=C:\Expomecanico\Expo2012A.mdb;Persist Security Info=False;")
SQL = ("Delete From noregistrados Where ID = " & TextBox1.Text & " , con12")


Cmd = New OleDbCommand(SQL, Con)
Con.Open()
objCmd = New OleDbCommand(SQL, Con)
objCmd.ExecuteNonQuery()
Con.Close()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""


Gracias por sus respuestas..