Vote count:
0
Just an FYI, I know there are different ways to handle this, but I need it to work in this particular way for my project.
I create a DataSet(DS) and a DataTable(DT), I then add a row to the DT with some data. I then try to add the DT (which contains data in a row) to the DS. At this point in Visual Studio when I step into the next line of code, the DataSet Visualizer shows I have a DataSet with 2 identically named tables, HOWEVER, one of them has data and the other does not. This is probably an oversight on my behalf but I can't identify it. Still learning C# here so that doesn't help either. Thanks for any help!
private string getStorageKey(string strStorageAccount)
{
DataSetStorageKeyDetails ds = new DataSetStorageKeyDetails();
DataSetStorageKeyDetails.StorageKeyDetailsDataTable dt = new DataSetStorageKeyDetails.StorageKeyDetailsDataTable();
string strStorageKey = "";
dt.Rows.Add(strStorageAccount);
ds.Tables.Add(dt);
DataSet dsOut = ServiceEnclosed.InterfaceService("GetStorageKey", ds);
DataTable dtr = dsOut.Tables[0];
DataSetStorageKeyDetails.StorageKeyDetailsRow dr = dt.First();
strStorageKey = dr.StorageName;
return strStorageKey;
}
asked 2 mins ago
Adding datatable to dataset creates 2 identical tables in dataset, is there another way to add?
Aucun commentaire:
Enregistrer un commentaire