Question: How check if datareader is null?

  • Thread starter Thread starter Ravikanth[MVP]
  • Start date Start date
R

Ravikanth[MVP]

Hi

Try this:
finally
' Always call Close when done reading.
if Not (myDataReader is Nothing)
myDataReader.Close()
end if

Ravikanth[MVP]
 
Thanks Ravikanth!

Ravikanth said:
Hi

Try this:
finally
' Always call Close when done reading.
if Not (myDataReader is Nothing)
myDataReader.Close()
end if

Ravikanth[MVP]
 
Back
Top