Problem with 9.7.26

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hlogar
Posts: 2
Joined: Thu 11 Apr 2013 21:26

Problem with 9.7.26

Post by hlogar » Fri 28 Oct 2016 09:06

We would like to switch our development to your latest version of Oracle Data Access Components but we have massive problemes with this version. We investigated our problems and it seems that there is a diffence in the parameter handling between 9.7.25 and 9.7.26.

Using the following example we would like to show the problem:

Code: Select all

sql.SQL.Add('INSERT INTO DISPO2.TB_TEST (ID, VALUE1, VALUE2) VALUES (:ID, :VALUE1, :VALUE2)');
sql.ParamByName('ID').ParamType := ptInput;
sql.ParamByName('ID').DataType := ftFloat;
sql.ParamByName('VALUE1').ParamType := ptInput;
sql.ParamByName('VALUE1').DataType := ftString;
sql.ParamByName('VALUE2').ParamType := ptInput;
sql.ParamByName('VALUE2').DataType := ftString;

sql.ParamByName('ID').AsFloat := 1;
sql.ParamByName('VALUE2').asstring := 'Test1';
sql.execute;
We have a table with two string columns - VALUE1 and VALUE2 - and we want to insert a new entry. VALUE1 is empty so we do not set this value explicitly. Everything works fine - there is no error and the dbMonitor shows the correct SQL-Statement and the correct parameter values:
* VALUE1 - NULL
* VALUE2 - Test1

But in the database VALUE1 is filled with "Test1" and VALUE2 is empty.

It seems that the value for the second parameter is used for the first one because this one is not explicitly set.

When we execute this example with ODAC 9.7.25 everything works fine and correctly. The value "Test1" is filled in column VALUE2 and column VALUE1 is empty.

Is it now necessary to explicitly set the values for empty columns? Or are we doing anything else wrong? Or is there an error in the version 9.7.26?=

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

Re: Problem with 9.7.26

Post by MaximG » Fri 04 Nov 2016 08:38

We released a new build of ODAC 9.7.27 (https://www.devart.com/odac/revision_history.html), in which we fixed the bug, matching your description. Update ODAC to the latest version 9.7.27 and check the given example again. If the error is still reproduced, please let us know, what mode: the OCI or the Direct Mode you are working in with Oracle DB and also provide NLS parameters of the server and your environment.

hlogar
Posts: 2
Joined: Thu 11 Apr 2013 21:26

Re: Problem with 9.7.26

Post by hlogar » Fri 04 Nov 2016 09:39

Thank you very much for your response and the new version. We just checked our application with the new version and it worked fine. Thanks a lot.

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

Re: Problem with 9.7.26

Post by MaximG » Fri 04 Nov 2016 13:53

We were glad to help you. Please don't hesitate to contact us with questions concerning ODAC usage.

Post Reply