I added a new column (NEW_COLUMN) to an existing program and updated the store procedure and all respective files (*cs, *aspx). But now I am getting IndexOutOfRange Exception error during a run. The newly added column name matches through out the program
(no aliases used). Can someone please shade some light to see what I am doing wrong here?
this is the line the program fails:
item.NewColumn = (dataReader["NEW_COLUMN"] == null) ? "" : dataReader["New_Column"].ToString();
Here is my dataconnector for the stored procedure:
cmd.Parameters.Add(new SqlParameter("@pNewColumn", SqlDbType.VarChar)).Value = objIncident.NewColumn;
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IndexOutOfRangeException: NEW_COLUMN
at LocationUpdate.Core.DataObjects.LOCData.LoadDa ...
Go to the complete details ...