Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 2nd, 2004, 10:58 AM
jacksmash jacksmash is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 jacksmash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
  #2  
Old July 8th, 2004, 01:42 PM
jaramill jaramill is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 9 jaramill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 24 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Newbie Forms Builder question!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway