Simple DataReader Question

Results 1 to 2 of 2

Thread: Simple DataReader Question

  1. #1
    Join Date
    Dec 1969

    Default Simple DataReader Question

    Why is the DataReader Get methods (GetString, GetInt32) designed to raise an exception when a record in the resultset has a NULL column?? What is the reasoning behind this? Most records in a database have null values in the columns of the recordset. I know about the DBNULL test to evaluate if the column is NULL but I am just curious about the reasoning behind this. Anyone know?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Simple DataReader Question

    It&#039;s to *alert* you to the fact that it&#039;s a NULL value.<BR><BR>Don&#039;t think of exceptions as a slap on the wrist, think of them as a way for different modules to communicate "exceptions" to one another.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts