Page 1 of 1

ver 2.50 parameter bug

Posted: Wed 04 Jun 2008 00:32
by dahmz
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;

Posted: Wed 04 Jun 2008 12:01
by Plash
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.