|
Re: insert a record into database upon pressing a Button [message #619269 is a reply to message #619233] |
Mon, 21 July 2014 02:45 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
If the datablock is a database datablock then the form will automatically insert/update records on the corresponding table when you issue a commit.
If you don't want that to happen then you need to make it a non-database datablock. This will stop execute-query working so you'll need to populate the block with a select statement. You can then insert records into a table with a standard insert statement.
|
|
|
|
Re: insert a record into database upon pressing a Button [message #619350 is a reply to message #619346] |
Mon, 21 July 2014 14:40 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Normally, a master record is created first; detail records follow.
Otherwise, "at the same time" can be done with INSERT ALL statement:SQL> insert all
2 into dept (deptno, dname) values (50, 'IT')
3 into emp (empno, ename, deptno) values (12, 'Littlefoot', 50)
4 into emp (empno, ename, deptno) values (87, 'Bigfoot' , 10)
5 select * from dual;
3 rows created.
SQL>
|
|
|