|XML insert from forms [message #91924]
||Fri, 29 August 2003 04:25
Registered: November 2001
I have an xml file that I want to insert into a table using the database stored objects in Forms6i on Windows2000 server.
I am using Oracle 8i DB with XSU package.
My insert script is written in PL/SQL and saved as a stored procedure in the database.
My script is running fine if I call it from SQL Plus. However, if I call it from forms (as a stored procedure with input parameters) the script runs well for the first time and if run again, the whole application freezes and I have to suppress it with CTRL-ALT-DEL. Even if I enter another time, I can't access the stored procedure or run my script again.
The code I am using is the following:
finalStr varchar2(4000) := null;
-- the name of the table as specified in our DTD
-- the name of the data set as specified in our DTD
-- for getting the output on the screen
-- open the XML document in read only mode
v_FileHandle := utl_file.fopen('E:oracleora81bin','okay.xml', 'r');
when no_data_found then
if finalStr is not null then
finalStr := finalStr || charString;
finalStr := charString;
-- for inserting the XML data into the table
rowsp := xmlgen.insertXML('BILC_IMP_LC_MVTS',finalStr);
dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
SO WHAT'S THE PROBLEM????