|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Newbie Forms Builder question!
Hi,
I'm totally new at all this Form Building stuff, so I have some basic questions. I've spent hours searching the web and the help sections, and this forum seems to be the most helpful so far. Here's the question: If I haev a simple data block which displays all of the fields contained in a table, how do I add functionality to it? For example, I have a button which is supposed to INSERT into the table when clicked by the used. When I click the button, it does indeed ask me if I want to save changes and then it inserts the info, but the second time I click it, nothing happens. Here is my code in the when-button-pressed trigger: BEGIN IF :System.mode <> 'ENTER-QUERY' THEN Enter_Query; END IF; INSERT INTO Customer(CID,custname) VALUES (CUST_DATA.CID, :CUST_DATA.CUSTNAME); EXCEPTION WHEN OTHERS THEN message('ERROR!!'); COMMIT; END; Any suggestions would be greatly appreciated! |
|
#2
|
|||
|
|||
|
If the data block is based on the database table "customer" then Forms will do the inserting for you. If you're inserting vaues from a non-database block into a different database table then you have to issue an explicit database commit.
The commit you have in your code is a Forms commit. FORMS_DDL('COMMIT'); is the command you need. Also are you waiting for the user to populate the data block with data first or do you just want the user to press a button and automatically have data inserted into a table? Gio |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Newbie Forms Builder question! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|