Tuesday, March 27, 2012

Error: Column Name "X" appears more than once in the result column list.

Hello,

I am trying to follow along with the Data Access tutorial under the the "Learn->Videos" section of this website, however I am running into an error when I try to use the "Edit -> Update" function of the Details View form:

I'll post the error below. Any clues on how to fix this? Thanks in advance!!!

~Derrick

Column name 'Assigned_To' appears more than once in the result column list.

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.Data.SqlClient.SqlException: Column name 'Assigned_To' appears more than once in the result column list.

Source Error:

Line 1444: }Line 1445: try {Line 1446: int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();Line 1447: return returnValue;Line 1448: }

What does your UPDATE command look like?|||

Thanks for the reply. When I go to my Details.aspx page (the page giving me the error), I click on the Details View Control -> Configure Data Source, Click the Update Tab, and here is the Method Signature:

Update(String Assigned_To, String Request_type, String First_Name, String Last_Name, String Username, Nullable Created_On, String Request_Summary, String Expr1, Int16 Original_Request_Id), returns Int32

Does this help?

|||

I was able to resolve this issue. It had to do with the "String Expr1" part of the Update function. I removed any reference to Expr1 from all my data sets, refreshed the schemes in the web forms, and everything worked as it should.

Thanks for anyone who looked into it!

No comments:

Post a Comment