|
Back to the big brother on the first floor, I tried it, but it still doesn't work, it still runs
Fill: The SelectCommand.Connection property has not been initialized.
Explanation: During the execution of the current web request, an unhandled exception occurred. Please check the stack trace for details about the error and the source of the error in the code.
Exception details: System.InvalidOperationException: Fill: The SelectCommand.Connection property has not been initialized.
Source error:
Line 34: queryStr="select * from shippers";
Line 35: shipperAdapter=new SqlDataAdapter(queryStr,nwConn);
Line 36: shipperAdapter.Fill(shipperSet, "shippers");
Line 37: if(!Page.IsPostBack)
Line 38: {
Source file: c:\inetpub\wwwroot\webapplication1\webform3.aspx.cs Line: 36
Stack trace:
[InvalidOperationException: Fill: The SelectCommand.Connection property has not been initialized. ]
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, String srcTable)
WebApplication1._WebForm3.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapplication1\webform3.aspx.cs:36
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
-------------------------------------------------- ------------------------------
Version information: Microsoft .NET Framework version: 1.1.4322.573; ASP.NET version: 1.1.4322.573 |
|