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.
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 on 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.
To learn about ASE database server compatibility, refer to the Compatibility section.
Applications that use the SAP Sybase ASE provider require the following components to be installed on the client computer:
When an application was built without runtime packages (Link with runtime packages set to False in Project Options), you do not need to deploy any BPL files with it. For more information, see Deployment.
Note that UniDAC Trial requires deployment of additional BPL files regardless of Link with runtime packages.
Option name | Description |
---|---|
AnsiNull | This option serves primarily for Transact-SQL (Adaptive Server Enterprise) compatibility. AnsiNull 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 | The character set that will be used to transfer character data between the client and the server. |
ClientHostName | The hostname of the client machine. |
ColumnWiseBinding |
Enables Column-Wise Binding. The default value is
Note: Row-Wise Binding is enabled by default. However, some ODBC drivers don't support this mode. In this case, set the |
ConnectionTimeout | The time to wait for a connection to open before raising an exception. The default value is 15. |
DetectFieldsOnPrepare |
Detects fields when Prepare is executed. 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 through ODBC. |
EncryptPassword | Specifies whether the password will be transmitted in encrypted format.
epDisable
The default value. Use plain text password.
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.
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. |
TextSize | The maximum size of binary or text data in bytes that will be sent to or received from Adaptive Server, for example, TextSize=64000 sets this limit to 64K bytes. The default value is 0. Note: This option has no effect in the Direct mode because values are never truncated. |
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. |
Option name | Description |
---|---|
CommandTimeout | The time to wait for a statement to be executed. |
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. |
The TUniDump component has no ASE-specific options.
The TUniLoader component has no ASE-specific options.
The TUniDump component has no ASE-specific options.
The following table lists the constants for mapping SAP ASE data types to Delphi data types. See Data Type Mapping for more information.
Constant | Description |
---|---|
aseChar | Maps char to Delphi data types. |
aseNChar | Maps nchar to Delphi data types. |
aseUniChar | Maps unichar to Delphi data types. |
aseNVarChar | Maps nvarchar to Delphi data types. |
aseVarchar | Maps varchar to Delphi data types. |
aseUniVarChar | Maps univarchar to Delphi data types. |
aseTinyInt | Maps tinyint to Delphi data types. |
aseSmallint | Maps smallint to Delphi data types. |
aseUSmallint | Maps usmallint to Delphi data types. |
aseInteger | Maps integer to Delphi data types. |
aseUInteger | Maps uninteger to Delphi data types. |
aseBigint | Maps bigint to Delphi data types. |
aseUBigint | Maps ubigint to Delphi data types. |
aseDecimal | Maps decimal to Delphi data types. |
aseFloat | Maps float to Delphi data types. |
aseDouble | Maps double to Delphi data types. |
aseReal | Maps real to Delphi data types. |
aseNumeric | Maps numeric to Delphi data types. |
aseDate | Maps date to Delphi data types. |
aseTime | Maps time to Delphi data types. |
aseDateTime | Maps datetime to Delphi data types. |
aseBit | Maps bit to Delphi data types. |
aseBinary | Maps binary to Delphi data types. |
aseVarBinary | Maps varbinary to Delphi data types. |
aseImage | Maps image to Delphi data types. |
aseText | Maps text to Delphi data types. |
aseUniText | Maps unitext to Delphi data types. |
aseXml | Maps xml to Delphi data types. |
aseSmallmoney | Maps smallmoney to Delphi data types. |
aseMoney | Maps money to Delphi data types. |
aseSmalldatetime | Maps smalldatetime to Delphi data types. |
aseTimestamp | Maps timestamp to Delphi data types. |