public DataSet SelectBigcommerceSrvRows(DataSet myDataSet,string bigcommerceConnection,string mySelectQuery,string myTableName)
{
BigcommerceConnection myConn = new BigcommerceConnection(bigcommerceConnection);
BigcommerceDataAdapter myDataAdapter = new BigcommerceDataAdapter();
myDataAdapter.SelectCommand = new BigcommerceCommand(mySelectQuery, myConn);
BigcommerceCommandBuilder bigcommerceCommandBuilder = new BigcommerceCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the BigcommerceCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}