Subject Re: [IBO] IBOQuery EditSQL syntax
Author Helen Borrie

At 10:11 PM 9/08/2004 +0000, you wrote:
>Can you give me an example of the proper EditSQL syntax? And, do I
>need to set the IBOQuery RequestLive property to false for the
>component to use the EditSQL property?
>is the syntax as such
>UPDATE My_TABLE Set My_FIELD = :My_Field WHERE My_Key_Field
>= :My_Key_Field
>If the above is true do I need to manually create the params for it
>to work?
>And also if the above is true, is there another method to write the
>EditSQL statement other than the above?

First, if you have good KeyLinks and just one table in the dataset, then
simply set RequestLive true and IBO will build the EditSQL automatically.

Alternatively, if you need a custom statement to cause the dataset to be
updatable, then use an executable statement with a parameterised WHERE
clause, where the parameters have the same name as the fields named in the
dataset's KeyLinks statement. The custom statement can be any valid DML
statement or an EXECUTE PROCEDURE (:param1, etc.) statement.

So your EditSQL statement:
UPDATE My_TABLE Set My_FIELD = :My_Field WHERE My_Key_Field
= :My_Key_Field

would be valid (but unnecessary) for a dataset whose SQL statement was:

select My_Field, {other columns}
from My_Table
where {whatever}

and the KeyLinks was (validly) set to My_Key.

RequestLive isn't relevant any more once you use custom SQL.