MyTestAdapter.Fill(MyTestDataSet,"CustOrderHist")
>I'm learning how to call stored procedures with VS .NET, using the CustOrderHist stored procedure in the Northwind database. Basically, I have a test form with a textbox for the CustomerID, a DataGrid to display the results, and a button to execute the stored procedure. When I fill a plain, untyped dataset, everything works as expected. However, if I try to use a typed dataset, no records show up in the DataGrid (I do see the column headings). I suspect the problem may be the way I created the typed dataset. All I did was drag the CustOrderHist stored procedure from the Server Explorer to the dataset design area. Should I have done anything differently? Here is the code I am using:>string ConnectionString = "data source=JOEL-PC;initial catalog=Northwind;" + > "integrated security=SSPI;persist security info=True;workstation id=JOEL-PC;packet size=4096"; >SqlDataAdapter MyTestAdapter = new SqlDataAdapter("CustOrderHist",ConnectionString); >MyTestAdapter.SelectCommand.CommandType = CommandType.StoredProcedure; >MyTestAdapter.SelectCommand.Parameters.Add(new SqlParameter("@CustomerID",SqlDbType.NChar, 5)); >MyTestAdapter.SelectCommand.Parameters["@CustomerID"].Value = this.txtCustID.Text; > >// *** this works *** >DataSet MyTestDataSet = new DataSet(); > >// *** this doesn't work *** >//SPDataset1 MyTestDataSet = new SPDataset1(); > >MyTestAdapter.Fill(MyTestDataSet); >this.dataGrid1.DataSource = MyTestDataSet.Tables[0]; >>