Column 'column' does not belong to table Table
2007-11-06 14:48
399 查看
Server Error in '/' Application.
--------------------------------------------------------------------------------
Column 'C' does not belong to table Table.
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 'gameIsNow' does not belong to table Table.
FROM:http://www.cnblogs.com/Sniper/archive/2006/03/06/343986.html
最近项目上遇到一个很奇怪的问题,查询经常性的出错,这种出错是间歇性的。比如在代码中写select column1 from talbe1。执行完毕后Fill一个DataSet,再访问DataSet中的Table和Row以及Column。通常会有一些莫名其妙的错误,例如
Can not find Table 0.
Column "column1" dose not belong to Table table.
在大多数情况下,没有任何问题,但是程序运行一会儿(不定期),就会出现这个问题。过一会儿可能也好了,但是几十分钟或几个小时后又出现了。
经过种种分析、排除,查找原因,最后把问题确定在connection.Close()的上。
SqlConnection.Close Method
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdatasqlclientsqlconnectionclassclosetopic.asp
CAUTION Do not call Close or Dispose on a Connection, a DataReader, or any other managed object in the Finalize method of your class. In a finalizer, you should only releaseunmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a Finalize method in your class definition. For more information, see Programming for Garbage Collection.
根据这个文章,我们注释了log(日志记录)处的Finalize中的connection的close方法。问题得以解决,但是其原理百思不得其解。
--------------------------------------------------------------------------------
Column 'C' does not belong to table Table.
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 'gameIsNow' does not belong to table Table.
FROM:http://www.cnblogs.com/Sniper/archive/2006/03/06/343986.html
最近项目上遇到一个很奇怪的问题,查询经常性的出错,这种出错是间歇性的。比如在代码中写select column1 from talbe1。执行完毕后Fill一个DataSet,再访问DataSet中的Table和Row以及Column。通常会有一些莫名其妙的错误,例如
Can not find Table 0.
Column "column1" dose not belong to Table table.
在大多数情况下,没有任何问题,但是程序运行一会儿(不定期),就会出现这个问题。过一会儿可能也好了,但是几十分钟或几个小时后又出现了。
经过种种分析、排除,查找原因,最后把问题确定在connection.Close()的上。
SqlConnection.Close Method
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdatasqlclientsqlconnectionclassclosetopic.asp
CAUTION Do not call Close or Dispose on a Connection, a DataReader, or any other managed object in the Finalize method of your class. In a finalizer, you should only releaseunmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a Finalize method in your class definition. For more information, see Programming for Garbage Collection.
根据这个文章,我们注释了log(日志记录)处的Finalize中的connection的close方法。问题得以解决,但是其原理百思不得其解。
相关文章推荐
- 问题网站报错“Column sumquantity does not belong to table ”
- Column <Column Name> does not belong to table Table
- "column "x" does not belong to table "y""
- Proposed solution for the NHibernate exception “Column ‘Reserved Word’ does not belong to table ReservedWords.”
- Column 'Column Name' does not belong to table Table
- Ado.Net间歇性问题的一种解决办法 :Column 'column' does not belong to table Table
- Column does not belong to table error!
- source file does not belong to the project being debugged
- 错误:error: ISO C++ does not permit 'wxScrolledWindow::sm_eventTable' to be defined as 'MyClass::sm_eventTable'
- AndroidStudio导入别的软件工程时报错The patch c:\android-sdk-windows does not belong to a directory.Android stud
- Clion this file does not belong to any project target
- Mysql官方文档中争对安全添加列的处理方法。Mysql Add a Column to a table if not exists
- magento2 拿到sql后,导入发现错误:Constraint "quote_to_store" references table that does not exist.
- java.lang.SecurityException: Package com.android.settings does not belong to 1001
- 关于Mac版的Clion出现this file does not belong to any project target
- hive 异常 (Attempt to do update or delete on table terminal that does not use an )
- Type mytableview does not confirm to portocol UITableViewDataResource
- 删除用户时 提示this user does not belong to this group
- Mysql官方文档中争对安全添加列的处理方法。Mysql Add a Column to a table if not exists
- Clion this file does not belong to any project target问题解决方案