PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Configuring a connection
  • Notes
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Configuring the connection with WDSQSINS
HFSQLHFSQL Client/ServerNot available with these kinds of connection
Overview
For backward compatibility with the earlier versions of Native SQL Server Connector (also called Native SQL Server Access), the connection can still be configured in WDSQSINS (supplied with Native SQL Server Connector).
This software is supplied in 32 bits: WDSQSINS.EXEThis software is supplied:
  • in 32 bits: WDSQSINS.EXE
  • Versions 22 and later
    in 64 bits: WDSQSINS64.EXE
    New in version 22
    in 64 bits: WDSQSINS64.EXE
    in 64 bits: WDSQSINS64.EXE
Reminder: The setting of the connection performed by WDSQSINS must be done once only.
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.
  3. Specify the connection settings:
  • Choose the name of the data source. This name will be passed in parameter to SQLConnect for connecting 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.

Notes

  • The information about the setting 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 now is: 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 time-out: the time-out during the call to SQLLock can be infinite or not (deadlock). The "Time-out" is set to 1 minute by default, it can be modified.
  • the lock mode. See the documentation about the server for more details.
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 the "Test the connection" button. The status report is displayed.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment