广州市公租房申请条件:Fill: SelectCommand.Connection 属性尚未初始化。

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 00:25:13
行 137:
行 138: DataSet ds=new DataSet();
行 139: da.Fill(ds);
行 140: dgd_userlist.DataSource=ds;
行 141: dgd_userlist.DataBind();

源文件: c:\inetpub\wwwroot\cms\bookshop\userlist.aspx.cs 行: 139

堆栈跟踪:

[InvalidOperationException: Fill: SelectCommand.Connection 属性尚未初始化。]
System.Data.Common.DbDataAdapter.GetConnection(IDbCommand command, String method)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
bookshop.userlist.btn_search_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\cms\bookshop\userlist.aspx.cs:139
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()