I have a project that has been in production for a couple years now. It's a v1.1 ASP.NET web farm hitting a SQL database. The last couple weeks, the website has been erroring out on various pages for about 1-2 hours at a time twice a week. While the error
messages are occurring, I cannot reproduce the errors myself.
Here are some of the error messages I recieve:
Cannot find column [ColumnName]
[ColumnName] is neither a DataColumn nor a DataRelation for table RESULT.
[ColumnName] (This is a wierd one. The error message returned is just a column name)
No record found
Column '[ColumnName]' does not belong to table RESULT.
I come to a dead end when I follow the Stack Trace to find a programmatic error. I'm able to hit the same page with all the same form fields at the error occured on and I cannot reproduce.
The only consistentcy in these errors is that they come all at once and they are database related.
I have the error messages emailed to me as they occur with information about the error and a link with URL parameters to the page. During the last incident, I was hitting pages where the error just occured moments before.
Any help is greatly appreciated... even if it's another question.
You must use column name from the ASP.net, not from Database.
For example, in my database, the column is [Closed Num]. But asp.net create the name [Closed_Num] for me. When you use filter expression, use [Close_Num] no problem. If you use the column name in the database, you will get the similar error!
I am getting the error when I am trying to sort by clicking on the header text i.e. the column name on a gridview. The error says
Server Error in '/' Application.
'Cannot find column [column name]'
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.IndexOutOfRangeException: Cannot find column Used with Segmentation.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Did you ever find a solution to this. We are experiencing the same problem. Same error messages from assemblies that has been working for the last 3 years, and also a couple of times a week for one or two hours, untill we restart our sql server instance.
We have recently moved our code from sql server 2005, windows 2003 to windows 2008 web edition and sql server 2008, and started having these problems, so if you can give any insigt into this, please share.
jcossiboon
0 Points
2 Posts
'Cannot find column' errors
Oct 11, 2007 08:02 PM|LINK
Greetings!
I have a project that has been in production for a couple years now. It's a v1.1 ASP.NET web farm hitting a SQL database. The last couple weeks, the website has been erroring out on various pages for about 1-2 hours at a time twice a week. While the error messages are occurring, I cannot reproduce the errors myself.
Here are some of the error messages I recieve:
I come to a dead end when I follow the Stack Trace to find a programmatic error. I'm able to hit the same page with all the same form fields at the error occured on and I cannot reproduce.
The only consistentcy in these errors is that they come all at once and they are database related.
Anyone have an issue like this before?
david wendel...
All-Star
15865 Points
2243 Posts
Re: 'Cannot find column' errors
Oct 11, 2007 08:55 PM|LINK
Are you saying you can't replicate the problem "later" or on the same webserver at the same time as other users are having the problem?
jcossiboon
0 Points
2 Posts
Re: 'Cannot find column' errors
Oct 11, 2007 09:02 PM|LINK
I cannot replicate the problem at either time.
I have the error messages emailed to me as they occur with information about the error and a link with URL parameters to the page. During the last incident, I was hitting pages where the error just occured moments before.
Any help is greatly appreciated... even if it's another question.
josh
MSVSBoy
Member
2 Points
1 Post
Re: 'Cannot find column' errors
Oct 25, 2007 05:19 PM|LINK
You must use column name from the ASP.net, not from Database.
For example, in my database, the column is [Closed Num]. But asp.net create the name [Closed_Num] for me. When you use filter expression, use [Close_Num] no problem. If you use the column name in the database, you will get the similar error!
Hope it is helpful.
MSVSBoy
goodbrat_in
Member
14 Points
7 Posts
Re: 'Cannot find column' errors
Nov 26, 2008 08:32 PM|LINK
How to fine the column name created by asp .net?
goodbrat_in
Member
14 Points
7 Posts
Re: 'Cannot find column' errors
Nov 26, 2008 08:37 PM|LINK
I am getting the error when I am trying to sort by clicking on the header text i.e. the column name on a gridview. The error says
Server Error in '/' Application.
'Cannot find column [column name]'
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.IndexOutOfRangeException: Cannot find column Used with Segmentation.
Source Error:
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
If someone can help me with this, I'll be really thankful, I won't be fired from my job !!!
raghav_khung...
All-Star
32835 Points
5563 Posts
MVP
Re: 'Cannot find column' errors
Nov 27, 2008 04:59 AM|LINK
Hi,goodbrat
Ur r querying A query against the database
Now In u r query that u r requesting contains [column name]
suppose ur query is
Select [TestCol1],[TestCol2],[column name] ........................................
Now Debug that Query by putting breakpoint on the line which is causing the error .
Copy that Query
And run in sql server management studio Query anlyzer
did it run succesfully on that?
I am sure ,not it will give same error on message pane window.
That means there is no column name [column name] in that table from which u want to use that column.
So Please Check That.
PLZ MARK AS ANSWER IF IT HELP U.
THANKS.
oliver0303
Member
4 Points
3 Posts
Re: 'Cannot find column' errors
Feb 04, 2009 08:21 PM|LINK
Hi,
Did you ever find a solution to this. We are experiencing the same problem. Same error messages from assemblies that has been working for the last 3 years, and also a couple of times a week for one or two hours, untill we restart our sql server instance.
We have recently moved our code from sql server 2005, windows 2003 to windows 2008 web edition and sql server 2008, and started having these problems, so if you can give any insigt into this, please share.
Thanks...
mdivk
Member
59 Points
87 Posts
Re: 'Cannot find column' errors
Dec 12, 2011 07:19 PM|LINK
I encountered the same problem and resolved it:
The cause is when I post back the new data I got is empty due to a parameter error, once that's fixed, everything is working as expected.
HTH