Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/02/2011, 15:56
asolis1
 
Fecha de Ingreso: febrero-2011
Mensajes: 1
Antigüedad: 13 años, 2 meses
Puntos: 0
Pregunta Actualizar DataTable luego de borrar registro

Hola,

Tengo el siguiente codigo para borrar un registro:

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
' If there is data, delete the current row.
If m_DataTable.Rows.Count <> 0 Then
m_DataTable.Rows(m_rowPosition).Delete()
m_DA.Update(m_DataTable)
m_rowPosition = 0
Me.ShowCurrentRecord()
End If
End Sub

Pero cuando el programa pasa por la liniea " m_DA.Update(m_DataTable)", me da el siguiente error:

Dynamic SQL generation for the DeleteCommand is not supported against a SelectCommand that does not return any key column information.

Que estoy haciendo mal?

Agradeseria cualquier sugerencia.