DataSet myDS = new DataSet();
thats how you create it...
you can use filter on a datatable within a dataset
DataTable myDT = myDS.Tables[0];
to filter data
http://authors.aspalliance.com/olson...rSortData.aspx
or you can manually iterate the DataTable
foreach myDataRow in myDt.Rows
if(myData.Columns["column"].value == "xyz") (think its value... )
{
do this;
}
------------------------------------------------------- from one of my data
layer objects
SecureHandling mySH = new SecureHandling();
SqlConnection myCon = new
SqlConnection(mySH.Decode(ConfigurationSettings.Ap pSettings["online"]));
try
{
SqlDataAdapter myCommand ;
if(ShowOnlyActiveSizes == false)
myCommand = new SqlDataAdapter("sp_CDB_AvailableSizes_SelectAll", myCon);
else
myCommand = new SqlDataAdapter("sp_CDB_AvailableSizes_SelectActive ", myCon);
myCommand.SelectCommand.CommandType = CommandType.StoredProcedure;
DataSet mySizes = new DataSet();
myCon.Open();
myCommand.Fill(mySizes, "mySizes");
return mySizes;
}
finally
{
myCon.Close();
myCon.Dispose();
}
--
Regards,
HD
Once a Geek.... Always a Geek
"brian" <bs******@lbrspec.com> wrote in message
news:0b****************************@phx.gbl...
I tried opening 2 readers with the same connection and
soon found out that can't be done. I found out I need to
use a data set because that is a disconnected set. Can
someone tell me how to create a data set? And also
(mainly) to search through the data set for a particular
record as you do with a reader.
All the info I can find in the groups shows how to fill a
data adapter which I believe is close to what I need.
Thanks