Subject | Re: [IBO] CachedUpdates does not update the new value |
---|---|
Author | Carlos H. Cantu (TeamFB) |
Post date | 2006-05-15T19:25:04Z |
I don't use CDS, but what you are trying to do seems to be
double-buffering the data into ram, since both IBO+CachedUpdates and
CDS will keep the data in their respective memory buffers. Doesn't
looks like a good idea to me, not to speak about wasting RAM.
BTW, I remember to see some messages in the past saying that IBO is
not CDS friendly... but I can't remember why.
[]s
Cantu (Membro do TeamFB - FireBase)
http://www.warmboot.com.br
FireBase - http://www.FireBase.com.br
k> I use TIBOQuery + ClientDatasets. CachedUpdates= true to emulate the
k> UpdateMode=upWhereAll of TProvider and to use all fields in the WHERE
k> clausule.
k> When I modify a field, TIBOQuery does not use the new value in the
k> generated SQL statement, it uses the old value. I can see it in the
k> SQL monitor Window.
k> I have been studyng the IBO code and the problem is in the procedure
k> TIBODataSet.AssignParamsValues, exactly when tmpParam := FindParam(
k> tmpP.BestFieldName );
k> BestFieldName deletes the "OLD." prefix and then it points to the new
k> value, in the sql "SET" clausule, instead of the sql WHERE clausule.
k> For example, IBO generates the following statement:
k> UPDATE CUSTOMER SET NAME=:NAME WHERE NAME=:OLD.NAME
k> In the form, I modify the name box, for example for JOHN to ED.
k> In the monitor I see
k> UPDATE CUSTOMER SET NAME=:NAME WHERE NAME=:OLD.NAME
k> :NAME='ED'
k> :OLD.NAME='ED'
k> The new value is never used because FindParam( tmpP.BestFieldName )
k> points the :NAME instead of OLD.NAME.
k> Does somebody the same problem? which is the best way to avoid it?
k> Thank you.
k> ___________________________________________________________________________
k> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
k> without the need for BDE, ODBC or any other layer.
k> ___________________________________________________________________________
k> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
k> keyword-searchable FAQ, community code contributions and more !
k> Yahoo! Groups Links
k>
double-buffering the data into ram, since both IBO+CachedUpdates and
CDS will keep the data in their respective memory buffers. Doesn't
looks like a good idea to me, not to speak about wasting RAM.
BTW, I remember to see some messages in the past saying that IBO is
not CDS friendly... but I can't remember why.
[]s
Cantu (Membro do TeamFB - FireBase)
http://www.warmboot.com.br
FireBase - http://www.FireBase.com.br
k> I use TIBOQuery + ClientDatasets. CachedUpdates= true to emulate the
k> UpdateMode=upWhereAll of TProvider and to use all fields in the WHERE
k> clausule.
k> When I modify a field, TIBOQuery does not use the new value in the
k> generated SQL statement, it uses the old value. I can see it in the
k> SQL monitor Window.
k> I have been studyng the IBO code and the problem is in the procedure
k> TIBODataSet.AssignParamsValues, exactly when tmpParam := FindParam(
k> tmpP.BestFieldName );
k> BestFieldName deletes the "OLD." prefix and then it points to the new
k> value, in the sql "SET" clausule, instead of the sql WHERE clausule.
k> For example, IBO generates the following statement:
k> UPDATE CUSTOMER SET NAME=:NAME WHERE NAME=:OLD.NAME
k> In the form, I modify the name box, for example for JOHN to ED.
k> In the monitor I see
k> UPDATE CUSTOMER SET NAME=:NAME WHERE NAME=:OLD.NAME
k> :NAME='ED'
k> :OLD.NAME='ED'
k> The new value is never used because FindParam( tmpP.BestFieldName )
k> points the :NAME instead of OLD.NAME.
k> Does somebody the same problem? which is the best way to avoid it?
k> Thank you.
k> ___________________________________________________________________________
k> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
k> without the need for BDE, ODBC or any other layer.
k> ___________________________________________________________________________
k> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
k> keyword-searchable FAQ, community code contributions and more !
k> Yahoo! Groups Links
k>