ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Native Connectors/Native Accesses / Native Oracle Connector
  • Overview
  • Programming
  • 1. Establishing 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Native Oracle Connector: Programming with SQL functions
Native Connectors (Native Accesses)Available only with this kind of connection
Overview
The SQL functions can be used to handle the ORACLE database, regardless of whether WDORAINS is used or not to configure the accessed database. For more details, see Configuring the connection with WDORAINS.
Differences compared to HFSQL programming: The use of SQL functions to handle Oracle data does not require importing the file structure into the analysis. However, the data must be handled by queries only. The content of the Oracle files cannot be read directly.
Programming

1. Establishing the connection

The SQLConnect function allows you to open a connection to an Oracle database through the Native Connector. The type of database used (ORACLE in this case) must be passed as parameter to SQLConnect.
The database name corresponds to:
  • the name defined in WDORAINS.
  • the name given in SQL*NET.
NumConnexion = SQLConnect("BaseOracle", "", "", "", "ORACLE")
Remark: You have the ability to perform an external authentication of the connection. For more details, see the help about SQLConnect.

2. Running queries

The queries are run by SQLExec. SQLExec expects the text of the SQL query as parameter, as well as the name that will be given to this query.
SQLExec("SELECT NOM, PRENOM, POSTE, PHOTO FROM CLIENT", "REQ1")

3. Retrieving the result

Several methods can be used to retrieve the result:
  • SQLFirst: Used to retrieve the result and initialize an SQLFirst/SQLCol browse.
  • SQLTable: Allows you to retrieve the result of the query in an Table control by programming the WINDEV application or the WEBDEV site. The result of the query can be retrieved by partial Fetch.
  • SQLFetch: Used to browse the different lines of the query result. The browse performed in the query result is an SQLFetch/SQLGetCol browse.
SQLLock is used to lock the table records or the records selected by the query.

4. Closing the connection

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

Last update: 10/02/2023

Send a report | Local help