
16/11/2008, 11:15
|
| | Fecha de Ingreso: diciembre-2004
Mensajes: 44
Antigüedad: 20 años, 4 meses Puntos: 1 | |
Borrar con ado.net Hola amigos del foro, tengo el siguiente problema: cuando borro un registro del dataset por mas que haga un UPDATE, ACCEPT CHANGES, no me lo borra de la base de datos. el codigo es el siguiente, ¿que puede llegar a estar pasando?
Dim buscafila() As DataRow
Dim fila As DataRow
buscafila = oDsMarcas.Select("Marca='" & ltmarcas.GetItemText(ltmarcas.SelectedItem) & "'")
For Each fila In buscafila
oDsMarcas.Rows.Remove(fila)
Next
oDa.DeleteCommand = oCb.GetDeleteCommand
oDa.Update(oDsMarcas)
oDsMarcas.AcceptChanges() |