The error occurs when reading data from a SqlDataReader, such as in the following code:
If a value returned by the datareader is NULL, the object will be a null reference. Convert the value to a string if it's possible that the value might be nothing:
The SqlDataReader cannot be read because there was an error in the query or stored procedure. Open SQL Query Analyzer and execute the query providing the same parameter values provided by the SqlDataReader. If an error occurs, modify the procedure or query as needed.
If no error occurred, check that values are being returned. If there are no return values, the SqlDataReader cannot be read. Either return values or use a SqlDataAdapter instead of a reader.