- Required configuration
- Necessary client layer
- Instant Client (recommended solution)
- Full Oracle client layer
- Notes common to the 2 client layers
- Compatibility with the Oracle 8i client layers
- Compatibility with Oracle 7.3
- Compatibility with WDORAINS.EXE
- To use Native Oracle Connector in your WINDEV applications or WEBDEV sites:
- Optimizing HFSQL functions
- Character set/language/region management
- Operating mode
Native Oracle Connector for WINDEV and WEBDEV
Available only with this kind of connection
WINDEV and WEBDEV 27 support an optional Native Oracle Connector (also called Native Oracle Access). This Native Connector allows you to access an Oracle database from a WLanguage program without using any external driver.
Benefits of using Native Oracle Connector:
- The HReadxxx functions (HReadNext, HModify, ...) can be used on the Oracle databases. Therefore, an Oracle database and an HFSQL database are handled by the same commands. Porting an existing application to external databases is simplified.
- The RAD allows you to generate the code with the Hxxx functions (HReadNext, ...) or with the SQLxxx functions.
- Direct access to an Oracle database with no intermediate layer: MDAC, OLE DB and ODBC are useless.
- WDMap (data viewer) can be used on your Oracle databases.
- The setup is straightforward: No OLE DB or ODBC layer required on the user computer.
- All versions of Oracle databases are supported.
The use of this Native Connector is highly recommended when developing Client/Server applications (that access the Oracle databases) with WINDEV. Feel free to contact us
for any additional information.
- To purchase Native Oracle Connector, contact PC SOFT sales department.
- The Native Oracle Connector is available in 32 and 64-bit.
- The Native Oracle Connector is available in Windows and Linux.
Necessary client layer
The Native Connector is compatible with the following Oracle client layers :
- Instant Client (recommended solution).
- Full Oracle client layer.
Instant Client (recommended solution)
This client layer, available from Oracle 10g, requires no setup or no configuration. It is the lightest client layer.
Simply copy the DLLs from the ZIP file (e.g. "instantclient-basic-nt-184.108.40.206.0.zip", available at www.oracle.com
) to the application directory, or a PATH directory.
Simply download the client layer ZIP file (e.g. "instantclient-basicxxxx.zip", available at www.oracle.com
) and install the client layer (see Oracle documentation for setup). If necessary, create a symbolic link to the module of the client layer "libclntsh.so".
The "Data Source" parameter of the WINDEV or WEBDEV connection will have the following format :
- host: Name of the computer that hosts the Oracle server.
- port: Number of the port chosen when installing the Oracle server.
- service name: Name of the service chosen when installing the Oracle server.
Full Oracle client layer
This client layer, available from Oracle 8i , requires a setup and a configuration. In most cases, the setup is followed by the definition of aliases with "Oracle Net Manager" that is used to specify the content of the "tnsnames.ora" file.
The "Data Source" parameter of the WINDEV or WEBDEV connection will have the following format:
With Alias corresponding to the name of the alias configured by "Oracle Net Manager".
In this case, when opening the connection, the Oracle client layer searches for the parameters corresponding to this alias (server name, port number, service name) in the "tnsnames.ora" file.
The following errors can be reported by the Oracle client layer when opening the connection if the alias is not configured properly:
- ORA-12514: TNS: the listening process does not currently know the requested service in the connection descriptor
- ORA-12154: TNS: the specified connection identifier cannot be resolved
This type of error must be corrected in the configuration of aliases.
The "tnsnames.ora" file is exclusively used by the Oracle client layer and not by the Native Connector.
For more details, see the Oracle documentation.
Notes common to the 2 client layers
- In most cases, the Oracle client layers are compatible with the servers 2 numbers less than the major versions. For example, the client layer 10g can be used to connect to an Oracle server 8i.
- The Native Connector is using the OCI.DLL DLL of the Oracle client layer to access the Oracle server. The 2 above-mentioned client layers contain this DLL.
The OCI.DLL DLL is loaded according to the standard load principle of Windows. The element is sought by priority order in:
- the application folder,
- the Windows folder,
- the folders of the PATH environment variable.
- The Native Connector is using the libclntsh.so DLL of the Oracle client layer to access the Oracle server. The 2 above-mentioned client layers contain this DLL.
Create (if necessary) a symbolic link to this module. For example:
ln -s libclntsh.so.12.1 libclntsh.so
- A 32-bit application requires the use of a 32-bit client layer. A 64-bit application requires the use of a 64-bit client layer. If you develop a 64-bit application, you may have to install the 32-bit and 64-bit versions of the Oracle client layer on your development computer because WINDEV and WEBDEV are 32-bit applications.
Compatibility with the Oracle 8i client layers
From version 17, the Native Connector connects using the UTF-16 character set if the client layer is recent enough, in order to prevent any possible inconsistencies between the application and the client layer.
However, the Native Connector does not specify a character set when it detects the Oracle 8i client layer, since this client layer does not support this option (Native Connector 16 and earlier).
In this case, the Oracle client layer assumes that the character set used is the one selected during the client layer setup.
The developer must make sure that the character set configured in the client layer on the end user's machine is the same as the one used in the WINDEV application or WEBDEV site.
A risk of data corruption exists if the sets of characters are not consistent.
The execution of queries without Unicode correction is not available with an Oracle 8i client layer.
Compatibility with Oracle 7.3
The Native Connector can be forced to operate in mode compatible with Oracle 7.3 is problems occur when connecting to an Oracle 7.3 server.
In this case, the Native Connector is using the OCIW32.DLL DLL..
However, some operations will no longer be available because of the limitations of the Oracle 7.3 client layer.
To force the Native Connector to operate in mode compatible with Oracle 7.3, the following string must be added into the optional information of WINDEV or WEBDEV connection:
Compatibility with WDORAINS.EXE
Full compatibility is ensured with WDORAINS.EXE
, a configuration tool provided with the Native Connector (32-bit, Windows only). However, its is not recommended for new development projects.
To use Native Oracle Connector in your WINDEV applications or WEBDEV sites:
To use ORACLE in native mode, you must program:
- Don't forget to read the limitations of the Native Oracle Connector.
- To deploy sites that use Native Oracle Connector, the Native Oracle Connector must be installed on the server (WEBDEV application server). This setup is performed from the DVD or setup package of the Native Oracle Connector.
- Thread error management: When a call to the Native Oracle Connector is made
from a thread, it is possible to manage errors in a normal way.
- The Native Oracle Connector manages UUIDs.
Optimizing HFSQL functions
- The "Browsing table" controls based on queries are optimized: the content of the Table control can be sorted by clicking one of its columns.
- To avoid re-running the same query several times when browsing its result, we advise you to use the hNoRefresh constant (if the data is modified by a single computer for example).
Character set/language/region management
The Native Connector fixes the NLS_LANGUAGE and NLS_TERRITORY properties to the values corresponding to the language and to the country used in the application when opening the connection.
Oracle 8i client layers (and earlier)
Operating mode identical to the earlier versions : The Native Connector specifies no character set and the developer must make sure the WINDEV or WEBDEV application uses the same character set as the one configured in the Oracle client layer.
Oracle 9i client layers (and later)
The Native Oracle Connector connects to the database using the UTF-16 character set.
ANSI data is exchanged (bind and define) using the ANSI character set used when the connection is opened.
There is therefore no longer any risk of a character set mismatch between the configuration of the client layer and the WINDEV or WEBDEV application.
You also have the ability to use the "Oracle Instant Client" client layer that requires no setup (simple copy of DLLs) and no configuration.
In any case, we recommend that you do not change the character set once the connection is opened otherwise inconsistencies may occur.
This page is also available for…