Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/01/2012, 07:45
tienda
 
Fecha de Ingreso: diciembre-2011
Mensajes: 70
Antigüedad: 12 años, 4 meses
Puntos: 2
Respuesta: Borrar en grid

arreglado, he creado un campo diferenciador...gracias
Public Sub borralinea()
'borra linea seleccionada en el datagridview
' Try

Dim adapt As New OleDbDataAdapter
Dim setda As New DataSet
Dim comandodel As New OleDbCommand

comandodel.Connection = conexion
comandodel.CommandText = "Delete * From Producto Where Asociado = @id and Producto = @pro"
comandodel.Parameters.AddWithValue("@id", (DgEscandallo.CurrentRow.Cells(0).Value))
comandodel.Parameters.AddWithValue("@pro", (TextProOri.Text))

conexion.Open()
comandodel.ExecuteNonQuery()
conexion.Close()
conectagrid()