J
jarb
Im not sure how to proceed on this one...
I have a dataset with one table being populated by a complex join from several
tables. Basically a fancy SELECT statement. Designer doesn't support generating
a dataset from a query like this (right?) so I hand created the dataset and the
SELECT statement. Now dataadapter.Fill() works fine. Its time to get Update()
working. Since I need to put values back into multiple tables I need to do
several SQL UPDATEs. I tried crafting a BEGIN END; block with all the needed SQL
(im using Oracle). But this doesn't return an affected row count so a
concurrency exception gets thrown. Seems like I have the wrong approach.
Am I supposed to not do SQL joins, but instead pull my whole database schema, or
at least all the necessary tables, locally into the dataset and then work with
it using the dataset paradigm, relations, and constraints? I really don't like
this. I don't want an in-memory wanna-be database. I just want a lightweight
cache to save network bandwidth and allow for form control binding.
Or should I create multiple data adapters for each SQL table UPDATE I need to
do? Or just create multiple update command objects and then assign them to the
dataadapter and Update() the dataset one command at a time? But im going to need
them all to be part of a transaction.
Maybe the simplest thing would just be to create yet another view in Oracle that
makes everything look like a single table. Too bad the db developer is swamped
with work.
TIA
I have a dataset with one table being populated by a complex join from several
tables. Basically a fancy SELECT statement. Designer doesn't support generating
a dataset from a query like this (right?) so I hand created the dataset and the
SELECT statement. Now dataadapter.Fill() works fine. Its time to get Update()
working. Since I need to put values back into multiple tables I need to do
several SQL UPDATEs. I tried crafting a BEGIN END; block with all the needed SQL
(im using Oracle). But this doesn't return an affected row count so a
concurrency exception gets thrown. Seems like I have the wrong approach.
Am I supposed to not do SQL joins, but instead pull my whole database schema, or
at least all the necessary tables, locally into the dataset and then work with
it using the dataset paradigm, relations, and constraints? I really don't like
this. I don't want an in-memory wanna-be database. I just want a lightweight
cache to save network bandwidth and allow for form control binding.
Or should I create multiple data adapters for each SQL table UPDATE I need to
do? Or just create multiple update command objects and then assign them to the
dataadapter and Update() the dataset one command at a time? But im going to need
them all to be part of a transaction.
Maybe the simplest thing would just be to create yet another view in Oracle that
makes everything look like a single table. Too bad the db developer is swamped
with work.
TIA