Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/08/2005, 18:59
mariano_donati
 
Fecha de Ingreso: marzo-2005
Mensajes: 1.418
Antigüedad: 19 años, 10 meses
Puntos: 9
'System.Data.SqlClient.SqlException' en system.data.dll

Información Adicional: Error del sistema.

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:
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
 
Y luego llamo al DataAdapter.Update() desde un botón.

Muchas gracias.
__________________
Add, never Remove