PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Configuring the ODBC administrator
  • Programming
  • 1. Opening the connection
  • 2. Running queries
  • 3. Retrieving the result
  • 4. Closing the connection
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 Progress Access: Programming with SQL functions
Native AccessesAvailable only with this kind of connection
Overview
The use of SQL functions for handling the Progress data does not require to import the structure of the files into the analysis. However, the data must be handled by queries only. The content of Progress files cannot be read directly.
Configuring the ODBC administrator
To configure the ODBC administrator:
  1. Start the administrator of ODBC data (ODBCAD32.EXE) on your computer. To do so, select "Start .. Run" from Windows and type "ODBCAD32.EXE".
  2. Select the "User database" tab.
  3. Click the "Add" button.
  4. Select the ODBC driver for Progress (installed with the client version of Progress).
  5. Click "Done".
  6. Enter the name of the Progress data source. This name will be used to identify the Progress database in your WINDEV programs.
  7. Validate ("OK" button).
Programming

1. Opening the connection

SQLConnect is used to establish a connection to a Progress database via Native Access. The type of database used (Progress in this case) must be passed in parameter to SQLConnect.
The database name corresponds to the name of ODBC data source (defined in the ODBC administrator).
ConnectionNum = SQLConnect("ProgressDatabase", "sa", "", "", "PROGRESS")

2. Running queries

The queries are run by SQLExec. SQLExec expects in parameter the text of the SQL query as well as the name that will be given to this query.
SQLExec("SELECT LASTNAME, FIRSTNAME, EXTENSION, PHOTO FROM CUSTOMER", "QRY1")

3. Retrieving the result

Several methods can be used to retrieve the result:
  • SQLFirst: Used to retrieve the result and to initialize a browse (SQLFirst/SQLCol).
  • SQLTable: Used to retrieve the query result in a memory table of the WINDEV or WEBDEV application. The result of the query can be retrieved by partial Fetch.
  • SQLFetch: Used to browse the different lines of query result. The browse performed in the query result is an SQLFetch/SQLGetCol browse.
SQLLock is used to lock either the table records, or the records selected by the query (see: Native Progress Access: limitations).

4. Closing the connection

SQLClose is used to close the connection to the database when all the necessary queries have been run.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment