Try OpenEdge Now
skip to main content
DataServer for Oracle
Initial Programming Considerations : ABL issues : Unsupported ABL statements
 

Unsupported ABL statements

The DataServer supplies you with the complete functionality of ABL when accessing Oracle databases. Nearly all ABL language elements (statements, functions, etc.) and Data Dictionary features work the same whether your application accesses an Oracle database through the DataServer or an OpenEdge database. You can use the DBRESTRICTIONS function to find out which ABL features that your non-OpenEdge databases, or specific tables in those databases, do not support.
For the DataServer for Oracle, DBRESTRICTIONS can return RECID, PREV, LAST, SETUSERID, SET-CURRENT-VALUE. If you connected to the logical database in read-only mode, the function returns READ-ONLY for the schema holder connection, not for the connection to the Oracle database. You can specify -RO in the connection to Oracle; in that case, the function returns READ-ONLY for the Oracle database as well. See the "DBRESTRICTIONS function" reference entry in OpenEdge Development: ABL Reference for information on syntax.
The following table lists some ABL statements and functions that behave differently between the OpenEdge DataServer for Oracle and a native OpenEdge database.
Table 18. ABL and Oracle differences
Feature
Description
BEGINS functionAbbreviated IndexUSING option
When you use these ABL elements to access data in an Oracle database, you will have different results than you would expect from ABL in the following case. If you have a customer named SI and one named SIM and you issue this FIND statement:FIND customer WHERE name BEGINS "SI"ABL returns the customer named SI; with the DataServer, the find fails because it is considered ambiguous. You receive the same results when you use an abbreviated index or the USING option in your query.
BEGINS operatorMATCHES function
To resolve BEGINS or MATCHES comparisons, Oracle does not use an index as ABL does. Instead, it might do a complete table scan. The table scan typically occurs when the Oracle DBMS does not know the value of the pattern when the SQL is compiled. See Query tuning for information on using the NO-BIND option to handle this situation.Do not use the MATCHES or BEGINS function with a pattern that is not an expression, but is stored in the Oracle database. Although theoretically possible with ABL, using this kind of criteria results in poor performance with an OpenEdge database.
CONTAINS operator
This option relates to word-indexing, which the DataServer does not support. It returns a compilation error.
COUNT-OF function
The DataServer does not support this function.
CREATE statement
Records you create after a cursor was opened might be invisible to that cursor. Oracle maintains a view of a database's state at the time when the user opens a cursor. Changes you make to a database after opening a cursor might not be visible.
CURRENT-VALUE function
You can use CURRENT-VALUE only after you have successfully called the NEXT-VALUE function.
CURRENT-VALUE statement
The OpenEdge DataServer for Oracle does not support setting a sequence generator's current value.
DBTASKID function
The OpenEdge DataServer for Oracle does not support this function.
FIND statementsQUERY option
To reduce the number of records Oracle includes in the results set, you should qualify your FIND statements and queries with a WHERE clause. This achieves a performance rate that is closer to OpenEdge performance. For better performance, use the DEFINE QUERY statement instead of FIND.To control the order of the results, include the USE-INDEX or BY options in your queries.
MATCHES function
If you want to use the MATCHES function for a string containing double-byte characters, you must fill out the character expression with periods (.). For example, where J is a double-byte character, the following statement does not find a match:FIND customer WHERE name BEGINS "SI"Add periods to search the entire field. For a field that is defined as 20 bytes long, to adjust the example, include seventeen periods after the single double-byte character, J.
OPEN QUERY statement
Newly created records might not appear in the results set of queries that you opened before you created the records. Reopen the query to access the new records.
INDEXED REPOSITION clause
Index reposition might cause new SQL to be executed thereby causing newly created records to appear.
SESSION:TIME-SOURCE handle
This system handle returns the Oracle DataServer's time information.
SETUSERID function
You cannot use this function to change the user ID and password of an Oracle login.
SHARE-LOCK option
You cannot use this option for a query with the FIELDS option.SHARE-LOCK is NO-LOCK for Oracle.
Time in the WHERE clause
ABL supports this option only if you have mapped Oracle DATE columns to the OpenEdge CHARACTER fields in the schema image.
USERID function
For a connection to an Oracle database, the USERID function returns the value that you specified for the -U parameter. For example, if you specify -U bob/password, USERID returns bob/password.