Saturday, February 25, 2012

Column name not recognised even though the procedure returns a table with that name?

I am databinding a dataset formed from a stored procedure,(all done on page_load).

However, the reference to the column name is not recognised with the following error being returned.

Column with name "CalcVal" was not found.

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.ArgumentException: Column with name "CalcVal" was not found.

Source Error:

Line 152: chartCommand.Fill(chartDs);Line 153: Chart1.DataSource = chartDs;Line 154: Chart1.DataBind();Line 155:Line 156: }

This worked before deployment and the other controls which are bound to data using stored procedures seem to work. However, these other data sources are all sqlDatasoure controls.

Any suggestions would be helpful.

I have found issues relating the to user ID and password which seems to depend on whether the web server and data server are the same machine or whether they are remote from each other.

cheers-jim.

The database folks left debug on which was returning an additionaltable that didn't have the column being referenced!!!

All solved. Cheers-jimBig Smile [:D]

No comments:

Post a Comment