// 1. setup command
// 2. add parameters
// 3. pass instance of command to data adapter
var da = new SqlDataAdapter( command );
// 4. create and fill a dataset (executes the command passed to the adapter)
var ds = new DataSet();
da.Fill( ds );
// 5. be sure to dispose command/connection
- API reference (albeit with a rather poor example): http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspx
- Other methods of populating a DataSet from a DataAdapter