Hello,
I have develop an apsnet page using vb language. I'm
currently retriving data from the database. I have two
fields that have null values. I get the following error
Cast from type 'DBNull' to type 'String' is not valid.
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.InvalidCastException: Cast from
type 'DBNull' to type 'String' is not valid.
Source Error:
Line 54: '// So, to get the correct
value, I simply subtract 1.
Line 55: EventDescription.Text =
myDataReader.Item("EventDescription")
Line 56: EventStartTime.Text =
myDataReader.item("EventStartTime")
Line 57: EventPhone.Text = myDataReader.Item
("EventPhone")
Line 58:
Any help is really appreciate
Thanks