Subject Re: [IBO] IBOQuery - Query Editor
Author Helen Borrie
At 07:17 PM 2/03/2006, you wrote:
>I can't find any documentation about various functionality in the
>Query Editor and would really appreciate some guidance:
>
>1. What is the function of the first "SQL" tab if there is a place to
>put the SQL code for edit, insert & delete on the "UpdateSQL" tab?

That is for the SQL property of your dataset (the SELECT statement).


>2. What is the function of the "Generate for Table" and "Generate for
>Procedure" buttons?

If your query has a) correct keylinks and b) RequestLive true, then
these buttons will generate the xxxSQL statements to be associated
with the dataset. Normally, you wouldn't do that, since IBO does it
automatically for plain queries; but it can be a "starting point"
for you to compose your custom xxxSQL statements if your dataset is a
non-updatable set.

Once you have custom xxxSQL that is valid, it won't matter whether
RequestLive is true or not. You will have a live set.

If you are using TIBOQuery or TIB_Query for non-select statements
then the xxxSQL properties, Requestlive, etc., don't apply. But you
need to get away from running executable statements through a query
object, anyway.


>3. In the InsertSQL window I want to pass the grid row values back
>into the database for an insert. How do I reference the new grid
>values to be inserted?

USE PARAMETERS !!!!!!!!!!!!!


>insert into PROJ (remark, created, createdby, lockd, lockdby)
> values (:remark, :created, :createdby, :lockd, :lockdby)

Of course, you'd better have a key in there somewhere, too!!

>I can see I'm going to have to purchase Helen's book....

Well...Helen's book is about Firebird, not about Delphi or
IBO. There is a whole Part devoted to writing client apps but it's
not specific to any language or development environment.

What you need right now is the Tech Info sheets. They are free and
can be downloaded from www.ibobjects.com/TechInfo.html

There's one publication that's designed to "pot up" a lot of the
theory and practice regarding IBO - it's the "GSG" (Getting Started
with IB Objects), which you can purchase online from community.ibobjects.com.

Helen