ver 2.50 parameter bug

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dahmz
Posts: 1
Joined: Wed 04 Jun 2008 00:22

ver 2.50 parameter bug

Post by dahmz » Wed 04 Jun 2008 00:32

Hello,

It seems version 2.50 has broken some of our code here.
All the parameters' values are blanked after calling ExecSql which is breaking our existing code that sets a parameter outside a loop (let's call the parameter "X"), with other parameters being set in the loop (ie X doesn't change throughout the loop). This previously kept X's value throughout the loop.

Obviously the work around is to set X within the loop, but we feel we shouldn't have to do this, and there may be other projects that we use this method.

Sample code:

Code: Select all

myQuery.Prepare;
myQuery.ParamByName('X').AsString := variable;

while {Loop condition} do
begin
  myQuery.ParamByName('Data').AsString := ZZZ;
  myQuery.ExecSQL;
  ...
end;

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 04 Jun 2008 12:01

We have fixed this problem. The fix will be included in the next build of IBDAC.

As a workaround set ParamType property of parameter to ptInput. It is recommended to set ParamType for all parameters to ptInput or ptOutput.

Post Reply