PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Native Sybase Connector: Specific features and remarks
Native AccessesAvailable only with this kind of connection
Overview
The following paragraphs present the main remarks and the specific features of Native Sybase Connector (also called Native Sybase Access).
Main remarks

Required version

Caution: This version of Native Sybase Connector operates with WINDEV 23 and/or WEBDEV 23.

Unicode items

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.
HCreation will display an error message when creating files containing items in Unicode format.

Page code

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:
    [MARS]
    CHARSET=iso_1
  • in the extended connection information: CHARSET=iso_1

A file is locked 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 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:
    TIMEOUT = <Time-out in seconds>
    This time-out is set to 60 seconds by default.
    For an endless wait, enter the following line:
    NOWAIT = Y
  • 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 and HOpenConnection.

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.

Record number

You cannot specify a record number other than zero in HWrite and HRead. Indeed, "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.
  • 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.

Array items

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.

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 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.
Note: To unlock the record (for all the users), use HUnlockRecNum(hCurrentRecNum).
Specific features regarding the HFSQL functions
The specific features for using the HFSQL functions with Native Sybase Connector are as follows:
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 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
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 (associated 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, WHERE must be replaced by HAVING GROUP BY.

IDENTITY column

In SQL mode (SQLExec ou HExecuteSQLQuery), to insert a value into an IDENTITY column, you must:
  • 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:
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment