- Main remarks
- Required version
- Unicode items
- Page code
- A file is locked in a transaction
- Specifying the execution time-out 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 the HFSQL functions
- Remarks specific to the Sybase database
- Aggregate column
- IDENTITY column
- Case sensitivity for the names of tables and columns
Native Sybase Connector: Specific features and remarks
Available only with this kind of connection
The following paragraphs present the main remarks and the specific features of Native Sybase Connector (also called Native Sybase Access).
Caution: This version of Native Sybase Connector operates with WINDEV 24 and/or WEBDEV 24.
The Unicode items are not supported by Native Sybase Connector. We advise you to use text items in Ansi format and to perform the conversion (if necessary) with UnicodeToAnsi
will display an error message when creating files containing items in Unicode format.
The page code (charset) used by Native Sybase Connector is cp850 by default. If the server is using a different page code, you have the ability to 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 the section corresponding to the server name. For example:
- in the extended connection information: CHARSET=iso_1
A file is locked in a transaction
starts a transaction and locks the table in Exclusive mode. HUnlockFile
validates the transaction and unlocks the table.
Specifying the execution time-out of the queries
To specify the execution time-out 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:
This time-out is set to 60 seconds by default.
TIMEOUT = <Time-out in seconds>
For an endless wait, enter the following line:
- with the HFSQL functions (HAdd, HExecuteQuery, ...), specify this time-out in the description window of the connection used.
You also have the ability to specify the execution time-out of queries via the "WD Connect Timeout" and "WD Command Timeout" options of HDescribeConnection
INSERT queries and automatic identifier
The automatic identifiers are not supported by the INSERT queries (created by programming or in the query editor). To use an automatic identifier, call HAdd
on the table.
You cannot specify a record number other than zero in HWrite
. Indeed, "zero" corresponds to the current record number.
- 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.
- No matter whether the options "Case sensitive", "Accent sensitive" and "Punctuation sensitive" are checked in the data model editor, the search will always be sensitive to the case, to the accented characters and to the punctuation.
The Array items are not supported by the Native Connector. If you are using an array item, only the value of subscript 1 in the array will be handled by the HFSQL functions (in read/write).
Independent HFSQL context
The management of the independent HFSQL contexts (check box available in the description of windows or reports) is not available in this version.
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.
The lock options (hLockWrite
) are ignored by the read functions (HReadXXX
). However, these locks options can be used by HAdd
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 the 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.
: To unlock the record (for all the users), use HUnlockRecNum
Specific features regarding the HFSQL functions
The specific features for using the HFSQL functions with Native Sybase Connector are as follows:
|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 hDistinct constant is ignored: all the records (including the duplicates) will be browsed.||HForward, HBackward,|
HReadPrevious, HReadNext, HNext
|Multi-file queries. HAdd, HModify and HDelete are not supported.||HAdd|
|HSeek, HFirst and HNext are used to position on a record without reading it.|
These functions can also be used to read the record.
|If a duplicate error occurs on HModify, HRead (associated with the hCurrentRecNum constant) does not read the requested record.|
This problem will be fixed in a forthcoming version.
|The hForceIDAuto constant is ignored by HModify. Sybase does not allow you to modify an "IDENTITY" column.||HModify|
Remarks specific to the Sybase database
Workaround: To use an aggregate column, WHERE must be replaced by HAVING GROUP BY.
- write the following syntax in front of the query: SET IDENTITY_INSERT <TableName> ON
- write the following syntax after the query: SET IDENTITY_INSERT <TableName> 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:
This page is also available for…
Click [Add] to post a comment