Click to See Complete Forum and Search --> : DataAdapater.Update


Liming
10-23-2003, 02:55 PM
Hi,

I'm trying to insert 1000-2000 records into a database table with more than
20,000 rows.

To use the Update method, first, I have to use the DataAdpater.Fill(dataset,
tablename) first... in the constructor of DataAdapter, I used sql "select
* from myTableName where Order>200".... the problem is that even with the
constrain, it's going to fill the dataset/tablename with more than 6000 rows
which are useless for the purpose of "insert".

All I want to do is to add 1000 new rows to the empty "tablename", add the
"tablename" to a empty dataset and issue the DataAdapater.Update method and
push the changes automatically back to the database without first filling
the dataset/tablename with that 6000 rows. Hope it's not too confusing at
this point.

Any clues on how to create a fresh dataset/datable and then push it back
to the datasource?

Thanks a LOT!!