Skip to end of metadata
Go to start of metadata

Procedure processing in ALTIBASE AUTOCOMMIT mode

COMMIT automatically after executing PROCEDURE/FUNCTION. Therefore, after executing DML statements in PROCEDURE/FUNCTION, the result may be different between ALTIBASE and Oracle.
If ALTIBASE is applied in the NON-AUTOCOMMIT mode, the same results as Oracle's NON-AUTOCOMMIT mode are displayed.

 

Oracle
Altibase


TYPE and RETURN TYPE of PARAMETER

TYPE of PARAMETER and CHAR, VARCHAR of RETURN TYPE must be sized.

In ALTIBASE, if PARAMETER or RETURN TYPE of PROCEDURE or FUNCTION is declared as CHAR or VARCHAR like Oracle, it has the same meaning as CHAR(1) and VARCHAR(1). Therefore, if the user wants to use a string rather than a single character, the user must specify its size. If not specified and the string is more than 2 characters, the following error occurs.

File and Output processing

ALTIBASE files and outputs related PROCEDUREs are automatically created in the SYSTEM_ user and defined as PUBLIC SYNONYM, so users can call and use only the PROCEDURE name.

 

Classification

Oracle

ALTIBASE

Standard output

DBMS_OUTPUT.PUT

PRINT

Standard output

DBMS_OUTPUT.PUT_LINE

PRINTLN

File processing

UTL_FILE.FOPEN

FOPEN

File processing

UTL_FILE.FCLOSE

FCLOSE

File processing

UTL_FILE.FCLOSE_ALL

FCLOSE_ALL

File processing

UTL_FILE.FCOPY

FCOPY

File processing

UTL_FILE.FFLUSH

FFLUSH

File processing

UTL_FILE.FREMOVE

FREMOVE

File processing

UTL_FILE.FRENAME

FRENAME

File processing

UTL_FILE.GET_LINE

GET_LINE

File processing

UTL_FILE.IS_OPEN

IS_OPEN

File processing

UTL_FILE.NEW_LINE

NEW_LINE

REF CURSOR

The REF CURSOR of ORACLE is usually declared in PACKAGE, and it is declared as OUT PARAMETER of PROCEDURE and used. However, ALTIBASE does not provide PACKAGE, so it must be created and used as TYPESET.

 

Oracle
ALTIBASE


WHERE CURRENT OF Statement

ALTIBASE does not support the WHERE CURRENT OF statement using CURSOR. However, if there is a PRIMARY KEY in the table, it can be changed as follows.

Oracle
ALTIBASE

EXCEPTION

Oracle and ALTIBASE have previously defined EXCEPTIONs that occur in Stored PROCEDURE/FUNCTION in the system.

 

Oracle

 

ALTIBASE

 

SQLERRM

SQLCODE

SQLERRM

SQLCODE

CURSOR_ALREADY_OPEN

-6530

CURSOR_ALREADY_OPEN

201062

DUP_VAL_ON_INDEX

-1

DUP_VAL_ON_INDEX

201063

INVALID_CURSOR

-1001

INVALID_CURSOR

201064

INVALID_NUMBER

-1722

INVALID_NUMBER

201065

NO_DATA_FOUND

+100

NO_DATA_FOUND

100

PROGRAM_ERROR

-6501

PROGRAM_ERROR

201067

STROAGE_ERROR

-6500

STROAGE_ERROR

201068

TIMEOUT_ON_RESOURCE

-51

TIMEOUT_ON_RESOURCE

201069

TOO_MANY_ROWS

-1422

TOO_MANY_ROWS

201070

VALUE_ERROR

-6502

VALUE_ERROR

201071

ZERO_DIVIDE

-1476

ZERO_DIVIDE

201072

ACCESS_INTO_NULL

-6530

 

Not supported

CASE_NOT_FOUND

-6592

 

Not supported

COLLECTION_IS_NULL

-6531

 

Not supported

LOGIN_DENIED

-1017

 

Not supported

NOT_LOGGED_ON

-1012

 

Not supported

ROWTYPE_MISMATCH

-6504

 

Not supported

SELF_IS_NULL

-30625

 

Not supported

SUBSCRIPT_BEYOND_COUNT

-6533

 

Not supported

SUBSCRIPT_OUTSIDE_LIMIT

-6532

 

Not supported

SYS_INVALID_ROWID

-1410

 

Not supported

 


  • No labels