T
tg
i have a strongly typed dataset that i will continually refill with
different data using SQL queries and want to process the data in each.
I get the first dataset fine, using a SQL command object and using a
dataAdapter.Fill() etc, and everything works fine. If i want to refill
that dataset with new data using dataAdapter.Fill() again, it doesn't
work. instead, the old data still remains in the dataset.
i've tried using the Clear() and Reset() methds of the dataset before
calling dataAdapter.Fill() with no avail. Here's some pseudocode to
help explain what i'm trying to do.
JobsDS ds = new JobsDS() // my custom dataset
....
//setup the data adapter, sql connection, command object
....
bool done = false;
while(!done)
{
// jobs is the table i'm always pulling data from.
da.fill(ds, "Jobs");
// process dataset with the new data from the above line
if( done_processing)
done = true;
}
different data using SQL queries and want to process the data in each.
I get the first dataset fine, using a SQL command object and using a
dataAdapter.Fill() etc, and everything works fine. If i want to refill
that dataset with new data using dataAdapter.Fill() again, it doesn't
work. instead, the old data still remains in the dataset.
i've tried using the Clear() and Reset() methds of the dataset before
calling dataAdapter.Fill() with no avail. Here's some pseudocode to
help explain what i'm trying to do.
JobsDS ds = new JobsDS() // my custom dataset
....
//setup the data adapter, sql connection, command object
....
bool done = false;
while(!done)
{
// jobs is the table i'm always pulling data from.
da.fill(ds, "Jobs");
// process dataset with the new data from the above line
if( done_processing)
done = true;
}