Consultor Eletrônico



Kbase 13725: PROC-STATUS function added with 7.3A on UNIX/MSW
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
PROC-STATUS function added with 7.3A on UNIX/MSW

The Following code demonstrates the use of the
PROC-STATUS function running against an ORACLE
DataServer. This NEW feature with 7.3A, provides
the application coder the ability to trap ORACLE
Error codes, and manage the error from within the
Application.


/* The following code should display 2 alert boxes,
* The first alert box is the count
* The second alert box should be the PROC-STATUS
* integer.
*/

DEFINE VAR stat AS integer.
run stored-proc send-sql-statement
("select count(*) from sys.obj$").

for each proc-text-buffer :
message "The SELECT count(*) from sys.obj$ = "
proc-text view-as alert-box information.
end.

close stored-proc send-sql-statement
stat = PROC-STATUS.

IF stat <> 0
then
message "Everthing is OK, Return Code = "
stat view-as alert-box error.
else
message " Return Code = " stat " and
should be -22003" view-as alert-box
error.


Progress Software Technical Support Note # 13725