Re: dataadapter.Update() multiple table update strategies



The problem is not with the dataset, it's with how you are submitting your
updates. I am battling a very similar issue, as it appears that Microsoft
generally does not support a database that has structures more complex than
parent-child, so many-to-many or other complex db scenarios have to be
hand-crafted. Most books I've read just blow right past the subject,
although I've heard that Sahil Malik's "Pro ADO" book discusses it. Sceppa's
book discusses ADO.Net transactions but other than a brief mention there's
not much on HOW to submit a massive update to a transaction sproc.

One thing, you'll never accompish what you are trying to do with a join.
Each table has to be handled separately, even if you are going to submit the
updates as a transaction. Something I'm playing around with is to create all
the individual table parameters with the DACW and then stitch them together
for the transaction (you can dump the visual adapters after you copy out the
params).

"jarb" <no@xxxxxxxx> wrote in message news:unb2h.209$3K7.53@xxxxxxxxxxxxxxx
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


.



Relevant Pages

  • Re: Database design pattern question
    ... When it does it will be necessary to replace the disk drive and then rebuild your database using your most recent backup and a transaction file containing the transactions that have been processed since the backup was made. ... That is the problem that I really need to be able to have multiple copies of the databases being updated in parallel and to have the ability to synchronise them later. ... Maintain a transaction log and "replay" the transaction log for each copy of the database into the other databases.. ...
    (comp.databases)
  • Re: Newbie ? using multiple users in one database at same time
    ... Since you are worried about multiple people opening the same table at the ... gathers the info into a SQL statement and performs an insert into the table. ... Database should be pretty simple: ... When ever a bag of cash is brought into the secure room and given to one ...
    (microsoft.public.access.gettingstarted)
  • Re: Simple transaction question ????
    ... in SQL data base through store procedure or function but then sounds more ... 1- I am not used to the SQL syntax in SQL server side, ... 2- Before storing those data in other database table, ... if you have to manage transaction that spawns a single database then ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: [fw-wiz] Protocol inspection
    ... There are a couple products aiming at that space. ... Basically, it's an SQL ... layer with a limited set of transaction options. ... state is stuffed into the database and a single page-view results ...
    (Firewall-Wizards)
  • Re: computational model of transactions
    ... conversations from years past about "multiple assignment". ... have to be only updates. ... problem that can not be dealt with simplyistic SQL based solutions. ... one still sees prior updates within the transaction. ...
    (comp.databases.theory)