Hi, I need you help pleaseeee..
Im doing a certain system that needs to connect to oracle database.
I named it to billcare.
I get connected using dataserver ODBC utilities.
In my script , i included the following syntax. Its purpose is merely to compute the total taxamt. Data is available in oracle database and I need it to store in progress schema.
At startup runtime, everything was fine and I did get the total tax.
However,in the middle of execution , it prompted me this error.
NA000: [Microsoft][ODBC driver for ORACLE]ORA-01000:maximum open cursors execeeded.
How could i avoid this kind of error during cursor execution? Please help....
Thanks very much for the support.
ASSIGN c_sql = "select sum(tax_amt) from billcare.ipinvcd
WHERE billcare.ipinvcd.yr = '" + c_yr +
"' AND billcare.ipinvcd.bil_period = '" + c_period +
"' AND billcare.ipinvcd.acct_n_ = '" + subsacct.acctnum +
"' AND billcare.ipinvcd.contract_n_ = '" + subsacct.contnum + "'" .
RUN STORED-PROC send-sql-statement handle2 = PROC-HANDLE NO-ERROR
( c_sql ).
FOR EACH proc-text-buffer WHERE PROC-HANDLE = handle2:
DISPLAY proc-text.
ASSIGN d_taxamt = DECIMAL(proc-text).
IF ERROR-STATUS:ERROR THEN
DO:
MESSAGE "Error cursor @seq20:" + ERROR-STAT:GET-MESSAGE(ERROR-STAT:NUM-MESSAGES)
VIEW-AS ALERT-BOX.
RETURN NO-APPLY.
END.
CLOSE STORED-PROC send-sql-statement WHERE PROC-HANDLE = handle2.
Im doing a certain system that needs to connect to oracle database.
I named it to billcare.
I get connected using dataserver ODBC utilities.
In my script , i included the following syntax. Its purpose is merely to compute the total taxamt. Data is available in oracle database and I need it to store in progress schema.
At startup runtime, everything was fine and I did get the total tax.
However,in the middle of execution , it prompted me this error.
NA000: [Microsoft][ODBC driver for ORACLE]ORA-01000:maximum open cursors execeeded.
How could i avoid this kind of error during cursor execution? Please help....
Thanks very much for the support.
ASSIGN c_sql = "select sum(tax_amt) from billcare.ipinvcd
WHERE billcare.ipinvcd.yr = '" + c_yr +
"' AND billcare.ipinvcd.bil_period = '" + c_period +
"' AND billcare.ipinvcd.acct_n_ = '" + subsacct.acctnum +
"' AND billcare.ipinvcd.contract_n_ = '" + subsacct.contnum + "'" .
RUN STORED-PROC send-sql-statement handle2 = PROC-HANDLE NO-ERROR
( c_sql ).
FOR EACH proc-text-buffer WHERE PROC-HANDLE = handle2:
DISPLAY proc-text.
ASSIGN d_taxamt = DECIMAL(proc-text).
IF ERROR-STATUS:ERROR THEN
DO:
MESSAGE "Error cursor @seq20:" + ERROR-STAT:GET-MESSAGE(ERROR-STAT:NUM-MESSAGES)
VIEW-AS ALERT-BOX.
RETURN NO-APPLY.
END.
CLOSE STORED-PROC send-sql-statement WHERE PROC-HANDLE = handle2.