Hi,
As far as I know, 1 database source can only insert or update or delete to 1 table. So if my transaction need to update to more than 1 table, what should I do so the data can be saved in all or none manners?
Call a stored procedure? execute query directly? or maybe there is other things that more simple?
Thanks in advance for the help.
one database source insert to more than 1 table?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
Technically speaking, there's nothing stopping you from putting more than 1 SQL command in the insert update or delete tabs as long at both tables that are being modified are accessible by the database connection that you specify for the database resource.
so you could have this in the insert tab
UPDATE Table1 SET column1='foo' where id=1234
UPDATE Table2 SET column2='bar' where id=1234
so you could have this in the insert tab
UPDATE Table1 SET column1='foo' where id=1234
UPDATE Table2 SET column2='bar' where id=1234
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Hi,
Unfortunately the code (following your example) gave me:
SQL command not properly ended error message.
The same message when I put the ; in the end of the command.
Unfortunately the code (following your example) gave me:
SQL command not properly ended error message.
The same message when I put the ; in the end of the command.
Segi wrote:Technically speaking, there's nothing stopping you from putting more than 1 SQL command in the insert update or delete tabs as long at both tables that are being modified are accessible by the database connection that you specify for the database resource.
so you could have this in the insert tab
UPDATE Table1 SET column1='foo' where id=1234
UPDATE Table2 SET column2='bar' where id=1234
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Who is online
Users browsing this forum: No registered users and 13 guests