03/01/2012, 07:45
|
| | Fecha de Ingreso: diciembre-2011
Mensajes: 70
Antigüedad: 13 años, 2 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() |