Subject Re: [IBO] Black IB_Edits?
Author Helen Borrie
At 11:54 AM 29/09/2005 +0000, you wrote:
>Hi Helen
>I tried the suggestion regarding conflicting uses still seem to have
>the problem though :(
>Moving everything to a datamodule solves it though thank you.
>Out of interest, I was only using one datamdule per project, and
>finding it very difficult to keep track on exaclty what each query was
>for. Is it better to use several datamodules? One for each type task

It depends on your application architecture more than anything else - what
you want to have on hand all the time, vs what you only want if a
particular form is created; and any variations between.

Within a dm, I always follow a naming scheme that reminds me of what an
object is, or does. And, generally, on the DM for a form, or group of
forms, that have a lot going on, I group things around the transaction that
they are going to be operated in. For example, if I'm loading up the Items
lists of a number of ib_comboboxes at the end of the DM's FormCreate, using
ib_cursors, and optionally refreshing them on demand, you'll find them all
together in the top right-hand corner around their own ib_transaction.

On an app I've just literally thrown together for the Firebird conference
programme and logistics, I have one optional form that you can chuck up
from the main form's menu to generate the reports you see on the Firebird
and IBPhoenix websites. The reports use dedicated SPs or views that are
not used by anything else. For that, I have ib_cursors that are on the
form itself, and the form has its own transaction. The whole kit and
caboodle gets created on demand and destroyed when the reporting is done
for the day. The "always active" transaction on the main form (where we're
plugging in the fresh data) is hooked up to an ib_transactionbar for
convenience, so I'll always see that noisy red and yellow glyph shouting at
me to commit the latest updates before I generate the day's HTML.

IBO has a number of gadgets, too, that you can use to hook contexts up
across forms - see TIBTransaction_Source, TIB_ConnectionSource, et al.

>PS I think you book is excellent! It lives on my desk :) I have, and
>do buy a lot of books, but your Firebird Book is one that I have found
>to be one of the most usefull, as it has a very good index, is easy to
>read and normally seems to have the answer I'm looking for!

But it's darned painful when you drop it on your foot. :->