Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: call_form cannot commit an SQL insert statement

Re: call_form cannot commit an SQL insert statement

From: Ta Xiong7 <ta_xiong7_at_hotmail.com>
Date: Tue, 14 May 2002 22:10:13 +0800
Message-ID: <abr5p7$qp6$1@violet.singnet.com.sg>


hi ryan,
your suggestion is helpful but my blocks are non-table/control blocks. i write my own sql statement to insert records.

i also tried to add a new table-block and when_new_form force/assign a value to the field in the table-block. eg. :block1.field1='dummy';

then i click on my save button which fires my sql insert procedure. forms does the right thing to inform me if i want to save changes (to the field1 where i assined a 'dummy' value). i click on 'yes' to save. form says 1 record commited. but when i check the tables, no records were inserted!!!!

any ideas?
rgds

"Ryan" <rgaffuri_at_cox.net> wrote in message news:zdYD8.81361$1a4.1570515_at_news2.east.cox.net...
> do this
>
> in the code where you do your commit. just before you attempt to do it..
do
>
> message(:system.record_status); pause
>
> it probably says 'query'
>
> if that is the case do the following
>
> set_record_property(read help for what to put here. set it to 'changed')
>
> then commit.
>
> "Ta Xiong7" <ta_xiong7_at_hotmail.com> wrote in message
> news:abph4f$n5v$1_at_coco.singnet.com.sg...
> > Hi guys
> > i'm having this problem with commiting an SQL statement (in a form
> > procedure)
> > scenario:
> > i have formA calling formB and a procedure in formB that inserts and
> commits
> > a record into an audit table, eg.
> > insert into tableB values('a','b','c');
> > commit;
> >
> > however, i can only commit the record if i'm in a new record in formA
and
> > double-click to trigger the call to formB. if i were to trigger it from
> an
> > existing record in formA, record would not be commited in formB.
strange
> > thing is it did not return any error, exception was not triggered. i
even
> > displayed the sqlerrm and err_text but all says ok.
> >
> > further testing i found out if i were to call formB from an existing
> record
> > and exit back to formA and then trigger it again in a new record in
formA,
> > it was not able to commit the record.
> >
> > so it works only if i trigger it on a new record in formA and must not
> > trigger it on an existing record even if i later trigger it on a new
> record
> >
> > anybody has faced this problem. hope someone can help.
> > appreciate if you also reply to my email at richard_tay_at_singstat.gov.sg
> > thanks a million ;-)
> >
> >
> >
>
>
Received on Tue May 14 2002 - 09:10:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US