Sybase 12.4.2 Server User Manual


 
Characteristics of Open Client and jConnect connections
492
SET TEMPORARY OPTION DATE_FORMAT=’YYYY-MM-DD’;
SET TEMPORARY OPTION TIMESTAMP_FORMAT=’YYYY-MM-DD
HH:NN:SS.SSS’;
SET TEMPORARY OPTION TIME_FORMAT=’HH:NN:SS.SSS’;
SET TEMPORARY OPTION DATE_ORDER=’MDY’;
SET TEMPORARY OPTION ESCAPE_CHARACTER=’OFF’
Note Do not edit the sp_tsql_environment procedure yourself. It is for system
use only. Options that are not supported by Adaptive Server IQ are ignored.
The procedure only sets options for connections that use the TDS
communications protocol. This includes Open Client and JDBC connections
using jConnect. Other connections (ODBC and Embedded SQL) have the
default settings for the database.
You can change the options for TDS connections as follows:
To change the option settings for TDS connections:
1 Create a procedure that sets the database options you want. For example,
you could use a procedure such as the following:
CREATE PROCEDURE my_startup_procedure()
BEGIN
IF connection_property(’CommProtocol’)=’TDS’ THEN
SET TEMPORARY OPTION QUOTED_IDENTIFIER=’OFF’;
END IF
END
This procedure changes only the QUOTED_IDENTIFIER option from the
default settings.
2 Set the LOGIN_PROCEDURE option to the name of a new procedure:
SET OPTION LOGIN_PROCEDURE=
’dba.my_startup_procedure’
3 Future connections will use the procedure.
For more information about database options, see Chapter 5, “Database
Options” in the Adaptive Server IQ Reference.
Data type mappings
If you are developing Open Client applications, you should be aware of
mappings between the data types supported by Adaptive Server IQ and those
expected by Open Client. For more information about these data type
mappings, see the chapter entitled “The Open Client Interface” in Adaptive
Server Anywhere Programming Interfaces Guide.