Sadun Sevingen wrote:
hi i get dataset from'an webservice so i don't have an adaptor... dataset's
structure is same as mine database table....
how can i update database table according to dataset...
What exactly do you mean by database table.
There is a table withing the DataSet.
If you do not have an adapter I assume the DataSet has already been
filled. This is all you need the adapter for as far as I know.
(adapter.Fill(ds))
Assuming DataSet was filled by the webservice:
DataSet ds;
..
..
//ds filled by adapter and you get the resulting DataSet
..
..
foreach(DataRow row in ds.Tables[0].Rows)
{
//do whatever you gotta do
//for example access string data from each row
//row.ItemArray[0].ToString()
//colum one in this case
//row.ItemArray[1].ToString()
//is colum 2 and so forth
//if you know the DataSet structure it shouldnt be a problem
}
Hope it helps.