Page 1 of 1

Problem with 9.7.26

Posted: Fri 28 Oct 2016 09:06
by hlogar
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?=

Re: Problem with 9.7.26

Posted: Fri 04 Nov 2016 08:38
by MaximG
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.

Re: Problem with 9.7.26

Posted: Fri 04 Nov 2016 09:39
by hlogar
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.

Re: Problem with 9.7.26

Posted: Fri 04 Nov 2016 13:53
by MaximG
We were glad to help you. Please don't hesitate to contact us with questions concerning ODAC usage.