levyuk
Well-known member
I'm getting data from a database no problem, but when there is a field with no data in it I encounter this problem:-
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: Specified cast is not valid.
Source Error:
Line 32: textboxaddress.text = reader.GetString(7)
Line 33: textboxcity.text = reader.GetString(8)
Line 34: textboxregion.text = reader.GetString(9)
Does anyone know how I can avoid this?
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: Specified cast is not valid.
Source Error:
Line 32: textboxaddress.text = reader.GetString(7)
Line 33: textboxcity.text = reader.GetString(8)
Line 34: textboxregion.text = reader.GetString(9)
Does anyone know how I can avoid this?