E
endy_tj
In vb6 I can use ADO's recordset to retrieve data from database, work
on the data, then send the modifications back to the database.
I use disconnected recordset, and call updatebatch to send updates to
database.
In vb.net, I use datatable to retrieve data from database and work on
the data. The next step, sending the updates to database, is a dilemma
for me.
If I use dataadapter to send updates, then I have to provide insert,
update, delete commands manually.
If I use tableadapter, then I must limit myself to use the matching
strongly typed datatable. Very limiting because I usually do sql join
in my select statement (or sql subquery), display the data on a grid,
let user modify, then save the changes back to database. Using
tableadapter, showing lookup data in transaction data is no longer
easy.
Another way is to use stored procedure, but then I have to use
database that supports stored procedure. I also prefer to keep the
database dumb, and store all the logic in one place, the program.
Is there any other way? Or should I just bite the bullet and build my
own command generator?
on the data, then send the modifications back to the database.
I use disconnected recordset, and call updatebatch to send updates to
database.
In vb.net, I use datatable to retrieve data from database and work on
the data. The next step, sending the updates to database, is a dilemma
for me.
If I use dataadapter to send updates, then I have to provide insert,
update, delete commands manually.
If I use tableadapter, then I must limit myself to use the matching
strongly typed datatable. Very limiting because I usually do sql join
in my select statement (or sql subquery), display the data on a grid,
let user modify, then save the changes back to database. Using
tableadapter, showing lookup data in transaction data is no longer
easy.
Another way is to use stored procedure, but then I have to use
database that supports stored procedure. I also prefer to keep the
database dumb, and store all the logic in one place, the program.
Is there any other way? Or should I just bite the bullet and build my
own command generator?