我的网站程序在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);