Subject Re: [IBO] Serious issue (I think)
Author Robert Martin
Hi Jason

I can understand why you would want the params to persist from an unprepare / reprepare of a statement but my issue is that they persist after changing the actual SQL statement!  I think this is really dangerous, I think it would be fair to assume that parameters are cleared when a new statement is entered.

If I have 'UPDATE aTable SET aField = :a, bField =:b' and I then change the SQL to 'INSERT INTO anotherTable (yField, zField) VALUES (:x, :a)'  the param value for 'x' is NULL but 'a' will have the value assigned in the previous SQL !


Merry Xmas
Rob





On 22/12/2015 6:13 a.m., supportlist@... [IBObjects] wrote:
Rob,

This is an intended behavior, so far as I can tell. I want input parameter values to survive an unprepare and reprepare of the statement. It is possible for you to remove the stored parameter values after doing an unprepare so that when you do a prepare of the new statement the old values will not reappear.

OldParamValueLinks.Clear;

This line of code makes those stored values go away.

PS. Upgrading your subscription would be much appreciated.

Jason Wharton
IBObjects Home Page