Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Web Application Server 3.0.1 - Enabling Transactions - Help needed
Hi,
We've installed the Web Application Server (advanced version)
and now we would like to enable the transactions. We have done
everything as explained in the doc
(see http://www.olab.com/doc/books/plsql/pl_trans.htm), but
we can not make it work.
Here is our package (spec and body) with
...startTest defined as transaction's Begin procedure
...commitTX defined as transaction's Commit procedure
...rollbackTX defined as transaction's Rollback procedure
Do we miss something ?
Thanks a lot for your help,
Yves Bolognini
Bolo's Computer Museum - http://www.bolo.ch
viCount integer := 0;
procedure startTest;
procedure displayForm (
avMessage in varchar2 );
procedure insertRecord (
avNom in varchar2, aiAge in integer );
procedure startTest
is
begin
displayForm('Welcome');
end;
procedure displayForm (
avMessage in varchar2 )
is
begin
htp.print(avMessage); htp.print('<FORM ACTION="' || owa_util.get_owa_service_path || 'TEST_TX.insertRecord">'); htp.print('Nom : <INPUT TYPE="TEXT" NAME="avNom" SIZE="20"><BR>'); htp.print('Age : <INPUT TYPE="TEXT" NAME="aiAge" SIZE="3"><P>'); htp.print('<INPUT TYPE="SUBMIT" VALUE="Add">'); htp.print('<INPUT TYPE="BUTTON" VALUE="Commit" onClick="top.location=''' || owa_util.get_owa_service_path || 'TEST_TX.commitTX'';">'); htp.print('<INPUT TYPE="BUTTON" VALUE="Rollback" onClick="top.location=''' || owa_util.get_owa_service_path || 'TEST_TX.rollbackTX'';">'); htp.print('</FORM>'); displayTable;
procedure insertRecord (
avNom in varchar2, aiAge in integer )
insert into TEST_TX values ( avNom, aiAge ); viCount := viCount + 1; displayForm('Inserted (' || avNom || ',' || aiAge || ')');end;
procedure displayTable
is
cursor vuTable is select * from TEST_TX; begin htp.print('<TABLE>'); for vrTable in vuTable loop htp.print('<TR>'); htp.print('<TD>' || vrTable.NOM || '</TD>'); htp.print('<TD>' || vrTable.AGE || '</TD>'); htp.print('</TR>'); end loop; htp.print('</TABLE>');
procedure commitTX
is
begin
htp.print('Commited ' || viCount || ' rows<P>'); htp.print('<A HREF="' || owa_util.get_owa_service_path || 'TEST_TX.startTest">Restart</A>'); viCount := 0 ;
procedure rollbackTX
is
begin
htp.print('Rolled back ' || viCount || ' rows<P>'); htp.print('<A HREF="' || owa_util.get_owa_service_path || 'TEST_TX.startTest">Restart</A>'); viCount := 0 ;
end;