ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Native Connectors/Native Accesses / Native SQL Server Connector
  • Overview
  • Configuring a connection
  • Remarks
  • Date format returned by the native SQL Server driver
  • Options of a connection
  • Options for the locks
  • Connection test
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Configuring the connection with WDSQSINS
HFSQL ClassicHFSQL Client/ServerNot available with these kinds of connection
Overview
For compatibility with the earlier versions of the Native SQL Server Connector (also called Native SQL Server Access), the connection can still be configured in WDSQSINS (supplied with the Native SQL Server Connector).
This software is supplied:
  • in 32-bit: WDSQSINS.EXE
  • in 64-bit: WDSQSINS64.EXE
Reminder: The connection settings via WDSQSINS must be defined only once.
This page presents:
Configuring a connection
To configure the connection:
  1. Start WDSQSINS.EXE.
  2. In the window that is opened (used to list the existing connections), click the "Add" button to create a new connection.
    Configuring the data sources
  3. Specify the connection settings:
    Description of a connection
  • Choose the name of the data source. This name will be passed as a parameter to SQLConnect to connect to the database. If the connection was defined in the data model editor of WINDEV or WEBDEV, specify the name of the corresponding connection.
  • Add a description caption.
  • Specify a connection string. The connection string is the name of the server where SQL Server is installed. It is used to find the database. Example of connection string: CSNT
  • Specify whether the format of the dates must remain 5.5-compatible.
    Reminder: Between version 5.5 and version 5.5B, the date format was modified. If you check the box, you will restore the date format returned before version 5.5B (see the paragraph below).
  • Specify the options to use:
    • Use a count(*) query with SQLFirst: During a browse performed by SQLFirst, SQLInfo fills the SQL.NbLine variable (number of result rows).
      By default, a COUNT query is generated to fill this variable ("Use a count(*) query with SQLFirst" is checked). This query increases the number of exchanges on the network but it optimizes the execution of SQLFirst.
      To avoid increasing the number of exchanges on the network, uncheck "Use a count(*) query with SQLFirst". In this case, the execution of SQLFirst may be slowed down.
    • SET ANSI_NULLS: Opens the connection in 'SET ANSI_NULLS ON' mode'. If this option is not checked, the default connection settings are used (settings defined on the server). This option is required to access a remote server (called linked server).
    • SET ANSI_WARNINGS: Opens the connection in 'SET ANSI_WARNINGS ON' mode'. If this option is not checked, the default connection settings are used (settings defined on the server). This option is required to access a remote server (called linked server).
  • The connection is added to the list once the parameters are validated.

Remarks

  • The information about the settings is stored in the Wdsqsins.ini file in the Windows directory ("C:\Windows\" or "C:\Users\LOGIN\AppData\Local\VirtualStore\Windows\" in Windows Vista/7).
  • WDSQL is used to check whether the connection to the database is correct.

Date format returned by the native SQL Server driver

In version 5.5: The date returned by the native SQL Server driver when reading a Date item was: JJ-MM-AAAA
In version 5.5B: The date returned by the native SQL Server driver when reading a Date item is now: YYYYMMDD.
Reasons behind this modification: Harmonizes the management of dates in WINDEV. Simplifies the assignment of the date read by the SQL Server driver in a WINDEV control of DATE type. No specific process is required to convert the date into a format recognized by WINDEV.
How to keep the former operating mode?
Configure the date format in WDSQSINS: check "Return the dates in 'YYYY-MM-DD' format (for SQLCol and SQLGetCol) " when describing the database used.
Reminder: When writing in a database via the native SQL Server driver, use the standard ODBC format {d 'YYYY-MM-DD'} (with a space between d and ' ). The driver automatically converts the date into the format used by the database.
Example:
INSERT INTO TABLE(DATE) VALUES ({d '1999-12-25'})
Options of a connection

Options for the locks

SQLLock expects two parameters:
  • the timeout: the timeout during the call to SQLLock can be infinite or not (deadlock). The timeout is set to 1 minute by default, but it can be modified.
  • the lock mode. See the documentation about the server for more details.
Options for the locks
Connection test
To run the test of a connection from WDSQSINS:
  1. Select the connection whose test must be run.
  2. Click the "Test" button.
  3. Specify the name and password of the user.
  4. Click "Test connection". The status report is displayed.
    Connection test
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/19/2023

Send a report | Local help