In my C# application I've retrieved a row of data from a MS-Sql database. While the majority of the data is coming across fine, the data reader in C# is throwing the "IndexOutOfRangeException" message on three columns in the result set. Those columns are defined in SQL as nvarchar(128). One of the columns (SecurityAnswer) contains the following value: 50D8B4A941C26B89482C94AB324B5A274F9CED66
Here's an extract of the code that is failing:
What do I need to do in order to be able to read the data from the Sql table in my C# code?
Steve
Here's an extract of the code that is failing:
Code:
String cSecurityAnswer;
cSecurityAnswer = myReader["SecurityAnswer"].ToString();
What do I need to do in order to be able to read the data from the Sql table in my C# code?
Steve