Problemas con el datareader en un ciclo
Publicado por Gustavo (1 intervención) el 14/07/2005 23:32:21
Lo que necesito es llenar una tabla con información de una base de datos, la cuestión es que para cada casilla a llenar debo ejecutar una consulta SQL.
Dim drRes As SqlDataReader
Al poner la instrucción :
drRes = incDB.GetInfo(strSQLRes)
dentro de un ciclo me da un error inexplicable cuado llega a la sentencia:
If drRes.HasRows = True Then
diciendo:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Apreciaré mucho la ayuda que se me dé.
Dim drRes As SqlDataReader
Al poner la instrucción :
drRes = incDB.GetInfo(strSQLRes)
dentro de un ciclo me da un error inexplicable cuado llega a la sentencia:
If drRes.HasRows = True Then
diciendo:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Apreciaré mucho la ayuda que se me dé.
Valora esta pregunta


0