Subject Re: [IBO] Why IBO & How?
Author Helen Borrie
At 10:52 AM 24/06/2003 -0700, you wrote:
>Sir,
>i am a fresh Delphi programmer. i was asked to use IBO. But i am all
>against data bound controls, as i don't have control over the
>transactions.

In IBO you have *extreme* control over the transactions. I expect you are
basing your assumption on DBXpress and the BDE, where you have virtually no
control over them

>But i am bound to use IBO.
>
>here are my queries
>1.Is IBO data bound or just data aware control? some times i find it data
>bound and at sometimes it behaves like just data aware control.

You need to distinguish between a component and a control. Data access
components are data bound (to use your term) by their very nature - because
that is what they are meant to do. A control displays data in a visual
container. A control can be data aware or not. I suppose you could say
that some data-aware controls are data-bound, in that they don't work
unless they have data linked to them.

>2.How to have control over the transactions? i want my transactions to be
>short & ours is real world appln. with more then 200 tables , equal number
>of views, 150 triggers, procedures.?

IBO has Transaction classes: TIB_Transaction, for use with the "native"
IBO data access (TIB_Connection, TIB_Query, TIB_Cursor, TIB_DSQL,
TIB_StoredProc) and TIBOTransaction, which can be added to the Transactions
collection of the TIBODatabase. For more info, get the relevant TechInfo
sheets from the website.

>3. Is there any transaction opening up active for a query with is just used
>for data retrieval purposes.? if so how to close them so the i do not
>account to junk transactions.

In IBO, you have to open datasets explicitly. Not sure what you mean by
"just used for data retrieval purposes" but the ib_query, ib_cursor and
ib_storedproc are all capable of retrieving sets of data. ib_dsql,
ib_cursor and ib_storedproc are also used where you need to execute a
statement.

You don't "close" transactions, you commit them, or roll them back.

>4.how to analyze and override the IB plan of execution of a query

This isn't an IBO question. I suggest you raise a specific example on the
firebird-support list (<mailto:firebird-support-subscribe@yahoogroups.com>)
where you will find many folk willing to help you to understand plans and
optimize your SQL to get better plans.

>5.Can you help me in getting a complete tutorial which will refine me as a
>Delphi programmer.

It depends on how much Delphi you already know. For Delphi techniques,
there are several papers in the Voyager section at
http://delphi-jedi.org Also Google search "Dr Bob" - this is Bob Swart,
who has a website full of Delphi help. Another place is http://www.matlus.com
For IBO, buy the Getting Started Guide to give you a kickstart, if you
already know Delphi. Use the on-line searchable FAQ, which is a front-end
for nearly 1000 snippets of help for IBO users. Download all of the
TechInfo sheets, too. Also, the samples folder in your IBO installation has
a large number of commented sample programs.

Above all, use this list. All of the "heavy" users watch this list and are
famous for their willingness to help newcomers.

>6.In what way will IBO improve the performance of the application?

It depends how bad it was before! :-) IBO is designed to work fast, safely
and efficiently with good client/server programming techniques. It is also
possible to write very bad programs using IBO. I can't over-emphasize the
need to understand what you are doing, both in Delphi and in the design and
workings of the database.

If you are using IB 6.0.x currently (the free version) then you should
urgently consider dropping it and moving to Firebird.

Helen