Page 1 of 1

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

Posted: Tue 29 Sep 2015 10:16
by dJabber
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.

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

Posted: Wed 30 Sep 2015 11:52
by MaximG
Thank you for the information. We have reproduced the issue, and we will inform you about the results shortly.

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

Posted: Wed 07 Oct 2015 10:33
by MaximG
Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next UniDAC build.