Problem with exec_sql.execute in 11g [message #545987] |
Sun, 04 March 2012 08:06 |
|
papalpha
Messages: 5 Registered: March 2012 Location: NC
|
Junior Member |
|
|
I am converting from 10g to 11g app server and having problem with the exec_sql.execute command. In my 10g version, the code is:
Declare
.
.
.
lv_dbms_journal_cursor exec_sql.curstype;
lv_status INTEGER;
.
.
.
BEGIN
.
.
.
IF (exec_sql.IS_OPEN (lv_dbms_journal_cursor)) THEN
exec_sql.close_cursor(lv_dbms_journal_cursor);
END IF;
lv_dbms_journal_cursor := exec_sql.open_cursor;
exec_sql.parse(lv_dbms_journal_cursor ,lv_journal_query2 ,1); -- 1 is for native sql
FOR lcv_column in 1..lv_no_columns LOOP
exec_sql.define_column(lv_dbms_journal_cursor, lcv_column, lv_column_value2, 512);
END LOOP;
lv_status := exec_sql.execute(lv_dbms_journal_cursor);
After this code caused the 11g forms session to crash, I modified the 11g version to the below, and it still crashes. Does anyone have any good suggestions?
Declare
.
.
.
lv_dbms_journal_cursor exec_sql.curstype;
lv_status PLS_INTEGER;
.
.
.
connection_id EXEC_SQL.ConnType;
BEGIN
.
.
.
connection_id := EXEC_SQL.DEFAULT_CONNECTION;
lv_dbms_journal_cursor := exec_sql.open_cursor(connection_id);
exec_sql.parse(connection_id, lv_dbms_journal_cursor, lv_journal_query2);
FOR lcv_column in 1..lv_no_columns LOOP
exec_sql.define_column(connection_id, lv_dbms_journal_cursor, lcv_column, lv_column_value2, 512);
END LOOP;
lv_status := exec_sql.execute(connection_id, lv_dbms_journal_cur
|
|
|
|
|
|
|
|
|
|