Eso me da cuando intento hacer un DataAdapter.Update() con el comando Delete.
Con los comandos Insert y Update del DataAdapter no tengo ningún problema, solo me aparece en ese caso.
Por si alguien puede ayudarme, les dejo el código:
Código:
Y luego llamo al DataAdapter.Update() desde un botón.Dim DeleteCommand As New SqlCommand() Dim SqlDeleteStatement As String SqlDeleteStatement = "DELETE FROM PRO_PRODUCTOS WHERE PRO_ID = @PRO_ID" DeleteCommand.CommandText = sqlDeleteStatement DeleteCommand.CommandType = CommandType.TextDeleteCommand.Parameters.Add("@PRO_ID", SqlDbType.Int, 4, "PRO_ID") DeleteCommand.Connection = Conn daProductos.DeleteCommand = DeleteCommand
Muchas gracias.