UniDAC

Using SAP Sybase ASE data access provider with UniDAC in Delphi

This article provides a brief overview of the SAP Sybase ASE data access provider for UniDAC used to establish a connection to ASE databases from Delphi and Lazarus. You will find the description of some useful features and how to get started quickly.

Overview

ASE provider is based on the ODBC provider. It uses SAP Sybase ASE ODBC driver to work with database. Main features of SAP Sybase ASE data access provider are:

The full list of SAP Sybase ASE provider features can be found at the UniDAC features page.

Both Professional and Standard Editions of UniDAC include the SAP Sybase ASE provider. Express Edition of UniDAC does not include the SAP Sybase ASE provider.

Compatibility

To learn about ASE database server compatibility, refer to the Compatibility section.

Requirements

Applications that use the SAP Sybase ASE provider require the following components to be installed on the client computer:

Deployment

To deploy Win32 applications built with run-time packages, it is required to deploy the aseproviderXX.bpl and odbcproviderXX.bpl files.

For more information about deployment of UniDAC-based applications, please, refer to the common Deployment topic.

ASE-specific options

TUniConnection

Option name Description
AnsiNull This option is implemented primarily for Transact-SQL (Adaptive Server Enterprise) compatibility. The AnsiNull option affects the results of comparison predicates with NULL constants, and also affects warnings issued for grouped queries over NULL values.
ApplicationName The name of a client application. The default value is the name of the executable file of your application.
Charset Specifies the character set that will be used to transfer character data between the client and the server.
ClientHostName Specifies the hostname of the client machine.
ColumnWiseBinding

If set to True, the option enables Column-Wise Binding mode. The fefault value is False.

Note: Row-Wise Binding mode is enabled by default. However, some ODBC drivers don't support this mode. In such case, set the ColumnWiseBinding option to True.

ConnectionTimeout The time to wait for a connection to open before raising an exception.
DetectFieldsOnPrepare Detects fields on the Prepare command execution.
The default value is True

Note: this functionality is not supported in some ODBC drivers.

Direct If set to True, connection is performed directly over TCP/IP, and does not require SAP Sybase ASE software on the client side. Otherwise, provider connects via ODBC.
EncryptPassword Specifies whether the password is transmitted in encrypted format.
epDisable - Use plain text password (the default value).
epRequire - Use encrypted password. If it is not supported, return an error message.
epPrefer - Use encrypted password. If it is not supported, use plain text password.
The default value is epDisable

Note: if the server is configured to require clients to use an encrypted password, entering a plain text password will cause login to fail.

IPVersion Use the IPVersion property to specify Internet Protocol Version.

Supported values:

ivIPBoth
Specifies that either Internet Protocol Version 6 (IPv6) or Version 4 (IPv4) will be used.

ivIPv4 (default)
Specifies that Internet Protocol Version 4 (IPv4) will be used.

ivIPv6
Specifies that Internet Protocol Version 6 (IPv6) will be used.

Note: When the IPVersion property is set to ivIPBoth, a connection attempt will be made via IPv6 if it is enabled on the operating system. If the connection attempt fails, a new connection attempt will be made via IPv4.
MultipleConnections Enables or disables the creation of additional connections to support concurrent sessions, commands and rowset objects.
PrepareMethod Use the option to specify whether stored procedures are created on the server for calls to SQLPrepare.

Supported values:

pmNone
Stored procedures are created for every call to SQLPrepare, which may decrease performance when processing statements that do not contain parameters.

pmPartial (default)
Stored procedures are created only if the statement contains parameters. Otherwise, the statement is cached and executed directly at SQLExecute time.

pmFull
Stored procedures are never created. Any syntax or similar errors are reported at the time of SQLExecute.

pmFullatPrepare
Stored procedures are never created. Any syntax or similar errors are returned at the time of SQLPrepare instead of SQLExecute.
SelectMethod Specifies whether cursors are to be used by the driver. smDirect indicates do not use cursors and smCursor indicates use cursors.
The default value is smDirect
QuotedIdentifier To avoid conflicts in procedures and queries that contain reserved words, you should use the QuotedIdentifier option. The QuotedIdentifier option tells Adaptive Server to consider any character string enclosed in double quotes as an identifier. If this option is disabled (by default), ASE considers everything inside the double quotes as a simple string.
UseUnicode Enables or disables Unicode support. Affects character data fetched from the server. When set to True, all character data is stored as WideStrings, and TStringField is replaced by TWideStringFiled.

TUniSQL

Option name Description
CommandTimeout The time to wait for a statement to be executed.

TUniQuery, TUniTable, TUniStoredProc

Option name Description
CommandTimeout The time to wait for a statement to be executed.
ExtendedFieldsInfo If True, an additional query is performed to get information about returned fields and tables they belong to. The default value is True.
FetchAll If True, all records of a query are requested from database server when the dataset is being opened. If False, records are retrieved when a data-aware component or a program requests it. The default value is False.

TUniScript

The TUniDump component has no ASE-specific options.

TUniLoader

The TUniLoader component has no ASE-specific options.

TUniDump

The TUniDump component has no ASE-specific options.

© 1997-2020 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback