public DataSet SelectMagentoSrvRows(DataSet myDataSet,string adobe commerceConnection,string mySelectQuery,string myTableName)
{
MagentoConnection myConn = new MagentoConnection(adobe commerceConnection);
MagentoDataAdapter myDataAdapter = new MagentoDataAdapter();
myDataAdapter.SelectCommand = new MagentoCommand(mySelectQuery, myConn);
MagentoCommandBuilder adobe commerceCommandBuilder = new MagentoCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the MagentoCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}