PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Required configuration
  • Necessary client layer
  • Instant Client (recommended solution)
  • Full Oracle client layer
  • Notes common to the 2 client layers
  • Compatibility
  • Compatibility with the Oracle 8i client layers
  • Compatibility with Oracle 7.3
  • Compatibility with WDORAINS.EXE
  • Use
  • To use Native Oracle Connector in your WINDEV applications or WEBDEV sites:
  • Optimizing HFSQL functions
  • Managing the set of characters/the language/the territory
  • Operating mode in version 16 and earlier
  • Operating mode in version 17 and later
  • Caution
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
Overview
WINDEV and WEBDEV 25 propose 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 a 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.
  • etc.
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.
Remarks:
  • To purchase Native Oracle Connector, contact PC SOFT sales department.
  • Versions 16 and later
    The Native Oracle Connector is available in 32 bits and in 64 bits.
    New in version 16
    The Native Oracle Connector is available in 32 bits and in 64 bits.
    The Native Oracle Connector is available in 32 bits and in 64 bits.
  • Versions 21 and later
    The Native Oracle Connector is available in Windows and Linux.
    New in version 21
    The Native Oracle Connector is available in Windows and Linux.
    The Native Oracle Connector is available in Windows and Linux.
Required configuration

Necessary client layer

The Native Connector is compatible with the following Oracle client layers :
  • Versions 17 and later
    Instant Client (recommended solution).
    New in version 17
    Instant Client (recommended solution).
    Instant Client (recommended solution).
  • Full Oracle client layer.
Versions 17 and later

Instant Client (recommended solution)

This client layer, available from Oracle 10g, requires no setup or no configuration. It is the lightest client layer.
Windows Simply copy the DLLs from the ZIP file (e.g. "instantclient-basic-nt-11.2.0.2.0.zip", available at www.oracle.com) to the application directory, or a PATH directory.
Versions 21 and later
Linux 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".
New in version 21
Linux 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".
Linux 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:[port][/service name]"
With:
  • 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.
New in version 17

Instant Client (recommended solution)

This client layer, available from Oracle 10g, requires no setup or no configuration. It is the lightest client layer.
Windows Simply copy the DLLs from the ZIP file (e.g. "instantclient-basic-nt-11.2.0.2.0.zip", available at www.oracle.com) to the application directory, or a PATH directory.
Versions 21 and later
Linux 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".
New in version 21
Linux 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".
Linux 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:[port][/service name]"
With:
  • 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.

Instant Client (recommended solution)

This client layer, available from Oracle 10g, requires no setup or no configuration. It is the lightest client layer.
Windows Simply copy the DLLs from the ZIP file (e.g. "instantclient-basic-nt-11.2.0.2.0.zip", available at www.oracle.com) to the application directory, or a PATH directory.
Versions 21 and later
Linux 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".
New in version 21
Linux 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".
Linux 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:[port][/service name]"
With:
  • 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:
"Alias"
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.
See the Oracle documentation for more details.

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.
  • Windows 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.
  • Versions 21 and later
    Linux 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
    New in version 21
    Linux 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
    Linux 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

Compatibility with the Oracle 8i client layers

From version 17, the Native Connector connects by using the set of UTF16 characters when the client layer is recent enough, in order to eliminate any risk of inconsistency regarding the set of characters between the application and the client layer.
However, the Oracle 8i client layer not offering this possibility, when the Native Connector detects that the client layer is in version 8i, the Native Connector specifies no set of characters (operating mode of versions 16 and earlier of Native Connector).
In this case, the Oracle client layer considers that the set of characters used is the set of characters selected when installing the client layer.
The developer must check that the set of characters configured in the client layer on the computer of the end user is identical to the set of characters used in the WINDEV application or in the 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:
"WD CLIENT LIBRARY = 7"

Compatibility with WDORAINS.EXE

A full compatibility is ensured with the configuration tool WDORAINS.EXE historically supplied with the Native Connector (in Windows only, in 32 bits). However, its use is not recommended for the new developments.
All the parameters that could be configured with WDORAINS.EXE in the WDORAINS.INI file can now be configured in the optional information (also called extended options) of connection.
Use

To use Native Oracle Connector in your WINDEV applications or WEBDEV sites:

To use ORACLE in native mode, you must program:
Remarks:
  • Don't forget to read the limitations regarding the use of 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.
  • Versions 24 and later
    Managing thread errors: When a call to the Native Oracle Connector is made from a thread, it is possible to manage errors in a normal way.
    New in version 24
    Managing thread errors: When a call to the Native Oracle Connector is made from a thread, it is possible to manage errors in a normal way.
    Managing thread errors: When a call to the Native Oracle Connector is made from a thread, it is possible to manage errors in a normal way.
  • Versions 24 and later
    The Native Oracle Connector manages UUIDs.
    New in version 24
    The Native Oracle Connector manages UUIDs.
    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).
Managing the set of characters/the language/the territory

Operating mode in version 16 and earlier

The Native Connector specifying no option, the Oracle client layer is using the default values selected when installing/configuring the client layer.
The developer must check that the set of characters used by the client layer on the computer of the end user is identical to the set of characters used in the WINDEV application or in the WEBDEV site.

Operating mode in version 17 and later

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 set of characters and the developer must check that the WINDEV or WEBDEV application is using the same set of characters as the one configured in the Oracle client layer.
Oracle 9i client layers (and later)
The Native Oracle Connector connects to the database by using the set of UTF16 characters.
The ANSI data is exchanged (bind and define) in the set of ANSI characters used when opening the connection.
Therefore, there is no risk of inconsistency regarding the set of characters 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.

Caution

In any case, we recommend that you do not change the character set once the connection is opened otherwise inconsistencies may occur.
Minimum version required
  • Version 9
This page is also available for…
Comments
Manual de Instalação do Driver
https://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/3364-driver-oracle-manual-instalacao/read.awp
BOLLER
03 Dec. 2019
Solução dos Erros ao compilar com o Driver Nativo do Oracle
Caso ocorra esse erro abaixo:

HexecuteSQLQuery function called
native Oracle access error.
Error Number = 1038
No access library to Oracle was found (oci.dll or ociw32.dll): the Oracle client layer may not be installed properly. To use the native Windev access for Oracle, you must install an Oracle client layer (version 7.3 or later). The Oracle client layer must br found in a directory declared in path.

Mude o seu projeto de 32 para 64 bits, caso não resolva, coloque as dlls no c:\Windows\System32\, é para resolver o problema. É importante o driver da PCSOFT do Oracle estar instalado corretamente. Coloque em variáveis do ambiente o caminho do Client do Oracle e seus exes e dlls da pasta bin. Caso ainda assim não tenha dado certo, entre em contato comigo (+55) 41 99949 1800 ou skype adrianoboller.
BOLLER
24 Sep. 2019
Solução dos Erros ao compilar com o Driver Nativo do Oracle
Caso ocorra esse erro abaixo:

HexecuteSQLQuery function called
native Oracle access error.
Error Number = 1038
No access library to Oracle was found (oci.dll or ociw32.dll): the Oracle client layer may not be installed properly. To use the native Windev access for Oracle, you must install an Oracle client layer (version 7.3 or later). The Oracle client layer must br found in a directory declared in path.

Mude o seu projeto de 32 para 64 bits, caso não resolva, coloque as dlls no c:\Windows\System32\, é para resolver o problema. É importante o driver da PCSOFT do Oracle estar instalado corretamente. Coloque em variáveis do ambiente o caminho do Client do Oracle e seus exes e dlls da pasta bin. Caso ainda assim não tenha dado certo, entre em contato comigo (+55) 41 99949 1800 ou skype adrianoboller.
BOLLER
24 Sep. 2019
NLS_LANGUAGE e NLS_TERRITORY
No Oracle execute:

Select *
from NLS_DATABASE_PARAMETERS
where parameter like '%LANG%'

retorno
1 NLS_LANGUAGE BRAZILIAN PORTUGUESE
2 NLS_DATE_LANGUAGE BRAZILIAN PORTUGUESE

Entao, o client do oracle deve ser instalado com essas caracteristicas acima para que a acentuação esteja ok.

Caso tenha uma configuração no Banco, nos Schemas e no Client tiver outra informação tipo English, sua acentuação estará prejudicada, pois o padrão English não possui ç Ç (Cedilha) e vai aparecer o ponto de interrogação "?" de ponta cabeça.

Solução:
Basta reinstalar o client informando o mesm tipo do banco de dados.
A divergencia gera o problema de acentuação. Recomendamos que o banco aceite UTF-8 e no Wx configure em internacionalização para UTF-8 para todos os idiomas.
BOLLER
11 Mar. 2019
Important remark
Para funcionar o driver nativo é importante ter o TNS_Name.ora e seu projeto adequado a versão 32 ou 64 bits que voce instalou, juntamente instalado o driver client da Oracle, diferente nao funciona, ok

Verificar nele qual é o SID pois ele será o Host da conection, em nenhum momento no Windev voce vai apontar o ip e porta do servidor, será baseado sempre a conection no TNS_Name.ora e sobre o SID que é o responsável pela conexão.

Exemplo de linha do TNS_name.ora

treina = (Description=(ADDRESS_LIST=(Address=(PROTOCOL=TCP) (Host=192.168.1.1)(Port=10110))) (CONNECT_DATA=(SID=infohome)))


He get SID, not get name.
Need to inform that the driver uses TNS-Name only the SID infohome, not the name treina!!!!

ex = "infohome" is Host in connection
adrianoboller
24 Jan. 2019