专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > .NET分析设计

紧急SelectCommand.Connection 属性尚未初始化

发布时间:2011-06-23 20:29:31 文章来源:www.iduyao.cn 采编人员:星星草
紧急求救,十万火急。。。SelectCommand.Connection 属性尚未初始化
我的网站程序在2005下测试运行一切正常为什么发布后运行首页会出现这种情况。
“/WebAttendence”应用程序中的服务器错误。
--------------------------------------------

Fill:   SelectCommand.Connection   属性尚未初始化。  
说明:   执行当前   Web   请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。  

异常详细信息:   System.InvalidOperationException:   Fill:   SelectCommand.Connection   属性尚未初始化。

源错误:  


行   221: custDA.SelectCommand   =   cmd;
行   222: DataTable   dt   =   new   DataTable( "DataList ");
行   223: custDA.Fill(dt);
行   224:
行   225: cmd.Parameters.Clear();
 

源文件:   D:\ninetowns\东莞指纹考勤\源代码\WorkAttendance\Ninetowns.WorkAttendance.OracleDAL\OraHelper.cs         行:   223  

堆栈跟踪:  


[InvalidOperationException:   Fill:   SelectCommand.Connection   属性尚未初始化。]
      System.Data.Common.DbDataAdapter.GetConnection3(DbDataAdapter   adapter,   IDbCommand   command,   String   method)   +1381395
      System.Data.Common.DbDataAdapter.FillInternal(DataSet   dataset,   DataTable[]   datatables,   Int32   startRecord,   Int32   maxRecords,   String   srcTable,   IDbCommand   command,   CommandBehavior   behavior)   +73
      System.Data.Common.DbDataAdapter.Fill(DataTable[]   dataTables,   Int32   startRecord,   Int32   maxRecords,   IDbCommand   command,   CommandBehavior   behavior)   +162
      System.Data.Common.DbDataAdapter.Fill(DataTable   dataTable)   +107
      Ninetowns.WorkAttendance.OracleDAL.OraHelper.GetDataTable(String   connString,   CommandType   cmdType,   String   cmdText,   OracleParameter[]   cmdParms)   in   D:\ninetowns\东莞指纹考勤\源代码\WorkAttendance\Ninetowns.WorkAttendance.OracleDAL\OraHelper.cs:223
      Ninetowns.WorkAttendance.OracleDAL.BaseT_EMPLOYEEDAL.GetAllSonT_EMPLOYEEs()   in   D:\ninetowns\东莞指纹考勤\源代码\WorkAttendance\Ninetowns.WorkAttendance.OracleDAL\BaseOracleDAL\BaseT_EMPLOYEEDAL.cs:177
      Ninetowns.WorkAttendance.Business.BaseT_EMPLOYEEBusiness.GetAllSonT_EMPLOYEEs()   in   D:\ninetowns\东莞指纹考勤\源代码\WorkAttendance\Ninetowns.WorkAttendance.Business\BaseBusiness\BaseT_EMPLOYEEBusiness.cs:49
      login.Page_Load(Object   sender,   EventArgs   e)   +18
      System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr   fp,   Object   o,   Object   t,   EventArgs   e)   +15
      System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object   sender,   EventArgs   e)   +43
      System.Web.UI.Control.OnLoad(EventArgs   e)   +98
      System.Web.UI.Control.LoadRecursive()   +71
      System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint,   Boolean   includeStagesAfterAsyncPoint)   +4313

 


--------------------------------------------
版本信息:   Microsoft   .NET   Framework   版本:2.0.50727.42;   ASP.NET   版本:2.0.50727.42

------解决方案--------------------
行 221:custDA.SelectCommand = cmd;
行 222:DataTable dt = new DataTable( "DataList ");
行 223:custDA.Fill(dt);
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: