Unidac - Oracle - Batch

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Unidac - Oracle - Batch

Post by AlainANTOCI » Tue 28 Sep 2021 08:55

Hi,
I use unidac 9.0.1, my code use Batch to update/insert record it work fine with my oracle 19 or with my client in version 12 but with version 11.2 I have error on keys. Is there anything to do with oracle 11.2 in the connect string

Thanks

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Unidac - Oracle - Batch

Post by MaximG » Fri 01 Oct 2021 10:45

Hi Alain!

Thank you for your reply! Do we understand correctly that your project using Batch operations is successfully executed when you work with Oracle 12 and 19, but leads to an error when working with Oracle 11.2?
What error are you getting? Please create and send us a simple test case that reproduces the issue, as well as a DDL script for creating the database objects used in this example! For your convenience, please use the e-support form https://www.devart.com/company/contactform.html


Looking forward to your reply!

AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Re: Unidac - Oracle - Batch

Post by AlainANTOCI » Thu 07 Oct 2021 13:33

Thanks,
(sorry for poor English, i'm French)
I've done more tests, i think the problems is with Oracle caracters set. In that query i use something like VALUE = :PARAMETER, where PARAMETER is a Varchar string. For lines where PARAMETER have no prominent character, for example it work with 'Entete' but not with 'Entête'. For my PC and server it work well for 70% of my client it also work but for some of them it does not work. The same code with ADO in place of Unidac it work fine, if I import an Oracle Dump from a client who does not work it work fine on my installation by default my caracter set is WE8MSWIN1252 I also try with WE8ISO8859P15 it also work.
Is there anything I can try to solve that problem ?, I was replacing code with ADO by Unidac (near 800.000 lines of code), and performance is much better so I don't want to use ADO anymore.

Regards

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Unidac - Oracle - Batch

Post by MaximG » Mon 11 Oct 2021 14:26

May I kindly ask to clarify if you have used the UseUnicode property in your project: https://www.devart.com/odac/docs/devart ... nicode.htm?
Also, please provide the following additional information:
a. What charset does the used DB have? To get this information, use the following query: select * from v $ nls_parameters
b. In which mode do you use our components: OCI Mode or Direct Mode?

AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Re: Unidac - Oracle - Batch

Post by AlainANTOCI » Wed 13 Oct 2021 09:27

Hi,
I've try on my own sever with charset WE8MSWIN1252 (Default) and WE8ISO8859P15 (wich is the one of some of my clients installation) both work for me.
For connection I use a TUniConnection component with connection string like : 'Provider Name=Oracle;Data Source=Name_From_tnsname.ora;User ID=User_Name;Password=User_Password;Login Prompt=False'
I don't use any Unicode property in TUniconnection.
I havent find the difference between my configuration and clients configuration (my oracle server is microsoft, clients can be microsoft or linux, some work and some not)
I there anything i can test to identify the difference ?

Regards

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Unidac - Oracle - Batch

Post by MaximG » Fri 22 Oct 2021 16:15

Thanks for the reply!

We do not quite understand the conditions in your environment that lead to an error. Therefore, in order to find a solution, we need the following info:

1) NLS parameters of the Oracle server with which problems arise when using batch operations. They can be obtained using the query: select * from v $ nls_parameters
2) the simplest test case, when executed, the problem manifests itself.

For your convenience, you can send the source code of the test project and information about the NLS parameters of the server using the e-support form https://www.devart.com/company/contactform.html

Let us know if you have any questions!

AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Re: Unidac - Oracle - Batch

Post by AlainANTOCI » Thu 20 Jan 2022 09:08

Hi,
I finally found the solution !
In the registry look at the keys under\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE you will have values like KEY_OraClientXXX in my case KEY_OraClient19Home2_32bit.
In the values you need to have a string value name NLS_LANG with values FRENCH_FRANCE.WE8MSWIN1252 in my case (FRENCH_FRANCE.WE8ISO8859P15 also work).
Some of my client haven't this information and french caracter like accented or special character do not display correctly and my query return wrong result.
Last question, before unidac I use ADO and I haven't to check this values in registry is there anything I can do instead of add this values in registry ?
Hope it will help other users.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Unidac - Oracle - Batch

Post by MaximG » Thu 03 Feb 2022 11:03

Indeed, setting up an installed Oracle client is an additional operation that does not depend on the operation of our access components: https://www.oracle.com/database/technol ... lang.html
We will add the relevant recommendation to our Knowledge Base so that our users can find the right solution as quickly as possible if necessary.
To set the required codepage you can try using the CHARSET option: https://docs.devart.com/unidac/using-oracle.htm

Post Reply