TUniQuery updating more than 1 table

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sir.wally.lewis
Posts: 42
Joined: Thu 25 Nov 2010 05:01
Location: PS

TUniQuery updating more than 1 table

Post by sir.wally.lewis » Fri 01 Apr 2011 14:01

I use unidac with firebird.

I have an SQL which is a join on 2 tables.
eg.

SELECT *
FROM TABLE1 T1
JOIN TABLE2 T2
ON( T1.KEY = T2.KEY )

I need when I insert into this dataset and then post.

TABLE1 to be inserted into, then TABLE2 to be inserted into.

How can I do this?

I also want it to be as simple as possible. :?

sir.wally.lewis
Posts: 42
Joined: Thu 25 Nov 2010 05:01
Location: PS

Post by sir.wally.lewis » Mon 04 Apr 2011 04:24

After much investigation and trial and Error.
I have come up with a solution.

Use VIEWS and then use the triggers on the views to update the real tables.

AndreyZ

Post by AndreyZ » Mon 04 Apr 2011 07:16

Hello,

It's good to see that you found a solution. If any other questions come up, please contact us.

Post Reply