Use sybase mode for maximum compatibility between different target databases. This allows client applications that use sybase mode to potentially operate independently of the target they are accessing. CIS functionality in Adaptive Server and Replication Server require sybase mode when communicating with DirectConnect.
When sybase mode is in effect, the DB2 access service performs a limited amount of T-SQL syntax transformation on all the SQL text that it receives. This includes text found in the following commands:
language
cursor declare
dynamic prepare
dynamic execute immediate
In sybase mode, the DB2 access service transforms Sybase T-SQL it receives into syntax that the target DBMS supports. If the DB2 access service receives syntax that it does not recognize, it simply passes the text to the DBMS for execution. As a result, a single application should be able to generate somewhat complex queries that can apply consistently to all Sybase-provided DB2 access services.
Sybase mode supports multiple statements in a batch, with the exception of set and select@@.
Because an application uses this mode for purposes of compatibility with all DB2 access services provided by Sybase, it should not issue SQL commands that are unique to any single target DBMS.
Sybase mode makes the following transformations to SQL syntax:
Transforms SQL commands shown in Table C-1. Unsupported syntax passes unchanged to the database for processing.
Transforms parameter marker names beginning with the @ character to a question mark (?).
Removes T-SQL comments in the form /*.....*/.
Converts T-SQL comparison operators (such as ! and =) into the target database equivalent.
Converts nonquoted tokens to uppercase, when needed.
Converts single and double quotation marks used as string delimiters to the appropriate delimiter for the target DBMS.
Strips dollar signs from money constants.
Adds a semicolon at the end of every statement.
Copyright © 2005. Sybase Inc. All rights reserved. |