Ver Mensaje Individual
  #21 (permalink)  
Antiguo 15/07/2011, 10:54
Avatar de HaverRamirez
HaverRamirez
 
Fecha de Ingreso: junio-2011
Ubicación: Guatemala
Mensajes: 273
Antigüedad: 12 años, 10 meses
Puntos: 33
Respuesta: Recordset, recuperar numero de filas ??

Upss, efectivamente,

when the field is null will throw a strong typing exception. Datasets attempt to cast the value out of the row when you access the property. This is one of the most annoying things about them.

If the original column datatype is not string then it will throw an exception. If column is of type string, String.IsNullOrEmpty should work fine.

Entonces lo que se tendria que hacer es utilizar un IsNull primero e implementar un OrElse o AndAlso para un string.isnullorempty

que se podria vincular con un evento...o simplemente manejar la validación con un delegado...cualquiera es valida.