ERROR IN USING COMMIT [message #206843] |
Fri, 01 December 2006 13:37 |
|
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 |
|
Littlefoot
Messages: 21823 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.
|
|
|