Home » Developer & Programmer » Forms » ERROR IN USING COMMIT
icon11.gif  ERROR IN USING COMMIT [message #206843] Fri, 01 December 2006 13:37 Go to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

HI ALL.(i m using oracle 9i + form 6i)
DEAR I M USING THE FOLLOWING CODE JUST TO PICK UP FEW NUMBERS FROM A RANDOM LIST OF NUMBERS.
AND THEN INSERT IT INTO ANOTHERE TABLE.

ITS WORKING ON 'WHEN_BUTTON_PRESSED' TRIGGER OF A BUTTON.
AND IN THE BELOW CODE 'TXT' IS THE NAME OF A TEXT BOX .TO CONTROL THE COUNTS.

problem is that when ever i press the button i then generate the output in anothere form .the output is quite nice but there is nothing in the back-end(in data base ).so then i place 'COMMIT' after insertion statment.but
it give me errors
FRM:--- NO THING TO CHANGE.

how can i make the insert statment (insertion of data) parmenent;
so please help me or discuss it with me.

regards.


PROCEDURE BALLOT_RESULT IS
CURSOR C IS
SELECT VOLUME_SR,YEAR,APP_NO,APP_NAME,F_NAME,POSTAL_ADDRESS,NIC,TELE_NO,GENDER,TNO
FROM V_BALLOT;
R C%ROWTYPE;
BEGIN
OPEN C;
LOOP
FETCH C INTO R;
EXIT WHEN C%ROWCOUNT > :TXT ;
INSERT INTO BALLOT_RESULT VALUES
(R.VOLUME_SR,R.YEAR,R.APP_NO,R.APP_NAME,
R.F_NAME,R.POSTAL_ADDRESS,R.NIC,R.TELE_NO,R.GENDER,
R.TNO);
--COMMIT;
END LOOP;
CLOSE C;

END;

[Updated on: Fri, 01 December 2006 13:41]

Report message to a moderator

Re: ERROR IN USING COMMIT [message #206854 is a reply to message #206843] Fri, 01 December 2006 14:46 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You could have helped yourself if you had put some effort and searched through the Forms forum.

Use STANDARD.COMMIT instead.
Previous Topic: Running Form on Web - Seperate Window
Next Topic: How can I install forms and reports?
Goto Forum:
  


Current Time: Fri Sep 20 13:45:24 CDT 2024