UniDAC 6.2.8 - exceptions during TUniquery.Open when some query parameter values are unassigned

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dJabber
Posts: 3
Joined: Thu 26 Sep 2013 10:43

UniDAC 6.2.8 - exceptions during TUniquery.Open when some query parameter values are unassigned

Post by dJabber » Tue 29 Sep 2015 10:16

Hello.

Database - IBM DB2 LUW 10.5

Reproducing steps
1. Put connection on the VCL form, then put TUniQuery and a button.
2. Implement button.OnClick handler

Code: Select all

  
procedure TForm7.Button1Click(Sender: TObject);
var
  i : integer;
begin
    query.SQL.Text := 'select * from mytable where sample_field=:field_value';//use arbitrary table from your DB
    query.Prepare;

    for i := 0 to query.Params.Count - 1 do
      query.Params[i].Bound := true;

    query.Open; ---->>>> exception here
end;
3.Execute application and press the button - the exception message appears.

если же присвоить параметру значение - исключения нет

If you assign value to query parameter, the exception does not appear.

Code: Select all

  
procedure TForm7.Button1Click(Sender: TObject);
var
  i : integer;
begin
    query.SQL.Text := 'select * from mytable where sample_field=:field_value';
    query.ParamByName('field_value').AsInteger:=1;
    query.Prepare;
    query.Open; ---->>>> исключения нет
end;
In 6.1.6. UniDAC version both wariants work without exceptions.

Developers, please, tell me what should I do in this situation.

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

Re: UniDAC 6.2.8 - exceptions during TUniquery.Open when some query parameter values are unassigned

Post by MaximG » Wed 30 Sep 2015 11:52

Thank you for the information. We have reproduced the issue, and we will inform you about the results shortly.

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

Re: UniDAC 6.2.8 - exceptions during TUniquery.Open when some query parameter values are unassigned

Post by MaximG » Wed 07 Oct 2015 10:33

Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next UniDAC build.

Post Reply