Subject TIBODataset ignores params when ParamCheck = False
Author Nando Dessena
Hello,
I am using latest IBO 4.2 and Delphi 7.

I have a TIBOQuery whose SQL property is something along the lines of

'execute procedure someproc(?, ?, ?, ?)'

and whose Params property correctly holds 4 hand-crafted TParam
objects (one for each ? in the SQL string).
ParamCheck is False since I am not using param names in the
SQL string hence I avoid the parsing overhead. Plase bear with me this
actually makes sense in my application.

When I call ExecSQL the execute procedure statement is issued by the
internal dataset, but the params are left behind. BTW this happens for
other DML statements too, ie it's not an execute procedure problem.

The problem seem to lie in TIBODataset.SysUpdateParams, whose first
line is:

if ParamCheck or ( csDesigning in ComponentState ) then

In my case neither ParamCheck nor the csDesigning conditions are
satisfied, so the internal dataset never receives the params.
The code apparently assumes there can be no params if ParamCheck is
False, which is wrong; it should better be testing Params.Count
or something instead.

I have commented the line above just to see if the problem would go
away, and it didn't, since there are cases in which SysUpdateParams
isn't called at all (including when the IBODataSet is not prepared
before hand). Not being an expert on the inner workings of IBO native
I am unable to follow the logic behind all this and find the problem
myself.

My list of thing to watch for is starting to grow (and I am porting a
*large* BDE application to IBO). This is a real showstopper since it
breaks my whole data access layer, so I need a fix ASAP.
Jason, any progress on my other issues?
Thnaks
--
Nando