public DataSet SelectSqlSrvRows(DataSet dataset,string connection,string query) { SqlConnection conn = new SqlConnection(connection); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = new SqlCommand(query, conn); adapter.Fill(dataset); return dataset; } |
Marinus
findAdapter(dataset).Update(dataset.getChanges()); |
The DataSet object is an independant object and by design it does not hold any reference to how it was populated and which object populated. Hence the DataSet does not store information stating which DataAdapter filled it.
It appears to be the same whether filled by a DataAdapter, manually or be reading an XML file.
Hence you might have to store this information in some other collection like a hashtable to map the data adapter with the dataset.
Regards,
Saurabh Nandu
www.MasterCSharp.com
www.AksTech.com