Subject Re: [IBO] How to use IBUPDATESQL?
Author Helen Borrie (TeamIBO)
At 04:19 PM 24-01-02 +0000, you wrote:
>Hey... Don't forget me please !!!

Probably the delay is due to the fact that this is a question with a lot of issues! People have to work and sleep sometimes.

>--- In IBObjects@y..., "pepmallorca" <pepmallorca@y...> wrote:
>> Hello!!!
>> There is a simple question about IBUpdateSQL. I'm a beginner with
>> this component.

Do you mean TIBOUpdateSQL? TIBUpdateSQL is not part of IB Objects.

> I have a IBQUERY and a IBUpdateSQL.

Likewise, are you really using IBQuery? It is not part of IB Objects either.

>> How can I execute the MODIFYSQL of an IBUpdateSQL1 like this:
>> update tbl_a
>> set
>> id = :id,
>> name = :name
>> where
>> id=:old_id;

If you are using TIBOUpdateSQL in conjunction with a TIBOQuery with CachedUpdates set true, then this will occur when you call ApplyUpdates.
If you are not using CachedUpdates, don''t use TIBOUpdateSQL.

>> The only way I know is this, but I think the locate is not the best
>> method... isn't it?

No, you don't use any code like this!

[snipped redundant code]

To update your query component (IBOQuery or IB_Query, simply call its EDIT method and Post. If AutoCommit is True on your TIBODatabase (or TIB_Database or TIB_Transaction if you are using TIB_Query) then Commit will follow Post automatically. If you have the transaction under explicit control (you called StartTransaction or you set Autocommit false)

>> Another thing, What's the difference between IBOQUERY and IB_QUERY?
>> Is the possibility of use with IB_UPDATESQL?

Both IBOQuery and IB_Query have their own, built-in UpdateSQL properties. You can use these when you have complicated datasets (i.e. sets that are output from stored procedures or joined queries). These are SQL statements which are to be executed INSTEAD of the standard methods of the dataset.

As I know you have the GSG now, study that thoroughly and I think you will start to see how much code you *won't* need to write. :))

(Speaking of sleep, I had better go and get some. I can hear birds.)

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at