CREATE PROCEDURE wit_GetPickListData @ItemType VARCHAR(20) AS BEGIN SELECT ItemKey, ItemType, Caption, ItemDesc FROM wit_PickLists WHERE ItemType = @ItemType ORDER BY Caption ENDI then bind the data set to a listbox and a text box:
// Bind the data set to the listbox lstItems.DataSource = dsItems.Tables[0]; lstItems.DisplayMember = "Caption"; lstItems.SelectedIndex = -1; // Bind the caption txtCaption.DataBindings.Add("Text", dsItems.Tables[0], "Caption");After I change the value in the textbox I can see te change in the DS using the visualizer. I call UpdateDataSet:
public void UpdateDataSet(DataSet oDS, string sTableName) { if (sTableName == null) { sTableName = oDS.Tables[0].TableName; } DataTable oTable = oDS.Tables[sTableName]; foreach (DataRow oRow in oTable.Rows) { oRow.EndEdit(); } try { _oAdapter.Update(oDS, sTableName); } catch (SqlException e) { throw e; } }It's erroring with "Procedure or function 'wit_GetPickListData' expects parameter '@ItemType', which was not supplied."