ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Native Connectors/Native Accesses / Native Sybase Connector
  • Overview
  • Main remarks
  • Necessary version
  • Unicode items
  • Page code
  • The blocking of a data file is carried out in a transaction
  • Specifying the execution timeout of the queries
  • INSERT queries and automatic identifier
  • Record number
  • Main specific features
  • Analysis options
  • Array items
  • Independent HFSQL context
  • Identical records
  • Locking records
  • Specific features regarding HFSQL functions
  • Remarks specific to the Sybase database
  • Aggregate column
  • IDENTITY column
  • Case sensitivity for the names of tables and columns
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
SAP ASE Native Connector (Sybase): Features and notes
Native Connectors (Native Accesses)Available only with this kind of connection
Overview
The following paragraphs present the main aspects and specific features of the Native SAP ASE Connector.
Main remarks

Necessary version

Attention: This version of the SAP ASE Native Connector (Sybase) only works with WINDEV and/or WEBDEV 2025.

Unicode items

The Native SAP ASE Connector does not support Unicode items. We advise you to use text items in Ansi format and to perform the conversion (if necessary) with UnicodeToAnsi.
HCreation will display an error message when data files containing items in Unicode format are created.

Page code

By default, the Native SAP ASE Connector uses code code page 850. If the server uses a different page code, you can configure the charset used by the Native Connector.
The page code (charset) used by the Sybase client:
  • in WDSYBINS.INI (found in the in "C:\Windows" directory):
    Specify the charset to use in the 'CHARSET' entry of section corresponding to the server name. For example:
    [MARS]
    CHARSET=iso_1
  • or in the extended connection information: CHARSET=iso_1

The blocking of a data file is carried out in a transaction

HLockFile starts a transaction and locks the table in Exclusive mode. HUnlockFile validates the transaction and unlocks the table.

Specifying the execution timeout of the queries

To specify the execution timeout of queries:
  • in SQL mode (SQLExec), you must enter the following line in the "[OPTIONS]" entry of the "WDSYBINS.INI" file found in the Windows directory
    TIMEOUT = <Timeout in seconds>
    This timeout is set to 60 seconds by default.
    For an endless wait, enter the following line:
    NOWAIT = Y
  • with the HFSQL functions (HAdd, HExecuteQuery, etc.), simply indicate this timeout in the description window of the connection used.
You also have the ability to specify the execution timeout of queries via the "WD Connect Timeout" and "WD Command Timeout" options of HDescribeConnection and HOpenConnection.

INSERT queries and automatic identifier

INSERT queries (created programmatically or using the query editor) do not support automatic identifiers. To use an automatic identifier, call HAdd on the table.

Record number

You cannot specify a record number other than zero in HWrite and HRead. "Zero" corresponds to the current record number.
Similarly, HLockRecNum and HUnlockRecNum can only be used on the current record.
Main specific features

Analysis options

  • The analysis options regarding the full-text indexes are not supported by the Native Connector.
  • The analysis options regarding the partial indexing of text memos are not supported by the Native Connector.
  • Whether the "Case sensitive", "Accent sensitive", "Punctuation sensitive" options are checked or not in the data model editor, the search will always be case, accentuation and punctuation sensitive.

Array items

The Array items are not supported by the Native Connector. If you are using an array item, only the value of index 1 in the array will be handled by HFSQL functions (read/write).

Independent HFSQL context

The management of the independent HFSQL contexts (check box in the description of windows or reports) is not available in this version.

Identical records

The Native Sybase Connector cannot differentiate between two identical records (which means with identical values for all items, excluding memo items).
When a record is modified or deleted, all the identical records will be modified or deleted.

Locking records

The lock options (hLockWrite and hLockReadWrite) are ignored by the read functions (HReadXXX, HReadSeekXXX). However, these locks options can be used by HAdd and HModify.
If a record is added or modified with a lock option, this record is locked:
  • for all the other users
  • for the user who requested the addition or modification if HReadFirst and HReadSeekFirst have been called on this record. If HRead is called on this same record, the record is not locked for the user who requested the addition or the modification.
Note: To unlock registration (for all users), use function HUnlockRecNum(hnumEnrEnCours).
Specific features regarding HFSQL functions
Bear in mind the following particularities when using HFSQL functions with the SAP ASE Native Connector:
LimitationsAffected functions
The hAffectBrowse constant is ignored. At the end of the operation, the browse continues from the record that was the current record before the addition or the modification.HAdd, HModify
The constant hDistinct is ignored: all records (including duplicates) are scanned.HForward, HBackward,
HReadPrevious, HReadNext, HNext
Multi-file query The HAdd, HModify and HSelete are not supported.HAdd
HModify
HDelete
HSeek, HFirst and HNext are used to position on a record without reading it.
These functions can also be used to read the record.
HSeek
HFirst
HNext
If a duplicate error occurs on HModify, HRead (with the hCurrentRecNum constant) does not read the requested record.
This problem will be fixed in a forthcoming version.
HRead
The hForceIDAuto constant is ignored by HModify. Sybase does not allow you to modify an "IDENTITY" column.HModify
Remarks specific to the Sybase database

Aggregate column

An aggregate column (SUM, MIN, etc.) cannot be used in a WHERE clause (in the query editor, in HFilter, HReadSeek, HExecuteSQLQuery and SQLExec).
Workaround: To use an aggregate column, simply replace the WHERE clause with the HAVING GROUP BY clause.

IDENTITY column

In SQL mode (SQLExec or HExecuteSQLQuery), to insert a value into an IDENTITY column, you must:
  • precede the query with the following syntax: SET IDENTITY_INSERT <NomTable> ON
  • follow the request with the following syntax: SET IDENTITY_INSERT <NomTable> OFF
For example, to insert the value "12" into the "CustomerID" column of "Customer" table, use the following syntax:
SQLExec("SET IDENTITY_INSERT Customer ON INSERT INTO Customer(CustomerID)" + ...
		" VALUES (12) SET IDENTITY_INSERT Customer OFF", "Qry1")

Case sensitivity for the names of tables and columns

The table names and the column names are case sensitive:
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/29/2024

Send a report | Local help