ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Native Connectors/Native Accesses / Native Oracle Connector
  • Overview
  • Programming
  • 1. Opening the connection
  • 2. Running the queries
  • 3. Retrieving the result
  • 4. Closing the connection
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Oracle Native Connector: Programming with SQL functions
Native Connectors (Native Accesses)Available only with this kind of connection
Overview
To use an Oracle database with the Native Connector (or "Native Access"), you can use SQL functions.
Differences from HFSQL programming: Using SQL functions to manipulate Oracle data does not imply 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. Opening the connection

SQLConnect opens a connection to an Oracle database via 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")
Note: External authentication of the connection is also possible.. For more details, see the help about SQLConnect.

2. Running the 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 LASTNAME, FIRSTNAME, EXTENSION, PHOTO FROM CUSTOMER", "QRY1")

3. Retrieving the result

Several methods can be used to retrieve the result:
  • SQLFirst: Gets the result and starts an iteration with SQLFirst/SQLCol.
  • SQLTable: Retrieves the result of the query in a Table control populated programmatically in the WINDEV application or WEBDEV website. The result of the query can be retrieved by partial Fetch.
  • SQLFetch: Used to read the different lines of the query result. The iteration over the query result is performed with SQLFetch/SQLGetCol.
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
STEP BY STEP INSTALL DRIVER
https://repository.windev.com/resource.awp?file_id=281474976711987;download-instant-client-oracle-database-nativa-para-seu-windev-webdev-instantclientbasicwindowsx64112040zip
Boller
30 Aug. 2024

Last update: 09/21/2024

Send a report | Local help