|
|
|
|
|
- Overview
- Configuring a connection
- Remarks
- Date format returned by the native SQL Server driver
- Options of a connection
- Options for the locks
- Connection test
Configuring the connection with WDSQSINS
 Not available with these kinds of connection
For compatibility with previous versions of SQL Server Native Connector (also known as SQL Server Native Access), it is still possible to configure the connection in the WDSQSINS software (supplied with SQL Server Native Connector). This software is supplied: - 32-bit: WDSQSINS.EXE
- 64-bit: WDSQSINS64.EXE
Reminder WDSQSINS connection settings must be made only once. This page presents: To configure the connection: - Start WDSQSINS.EXE.
- In the window that opens (used to list the existing connections), click the "Add" button to create a new connection.
- Specify the connection settings:
- 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 a connection chain: CSNT
- Specify whether the format of the dates must remain 5.5-compatible.
Reminder: Between version 5.5 and 5.5B, the date format returned has changed. 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 SQLPremier: When browsing with the SQLFirst function, the SQLInfo function fills in the variable SQL.NbLig (number of rows in the result)..
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 field of type Date was: DD-MM-YYYY. In version 5.5B: The date returned by the native SQL Server driver when reading a field of type Date is now: YYYYMMDD. Reasons for modification: Harmonize date management 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? Set the date format returned in WDSQSINS: simply check the "Return dates in 'DD-MM-YYYY' format (for SQLCol and SQLGetCol functions)" box when describing the database used. Reminder: When writing to a database using the native SQL Server driver, use the standard ODBC format {d 'YYYY-MM-DD'} (with a space between the 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 for the locks SQLLock expects two parameters: - wait: the wait when calling SQLBlocks can be infinite or not (blocking loop).. The timeout is set to 1 minute by default, but it can be modified.
- the lock mode. For more details, see the documentation about the server.
To run the test of a connection from WDSQSINS: - Select the connection whose test must be run.
- Click the "Test" button.
- Specify the name and password of the user.
- Click "Test connection". The status report is displayed.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|