Subject Re: [IBO] IB Basics?
Author Helen Borrie
At 01:41 PM 29-12-00 +0200, you wrote:
>Is it necessary to use a transaction with an ibquery if i need to read info
>from a database only? Do I use ibConnection or ibdatabase?
>I seem to be getting conflicting answers.

Everything in IB is done in a transaction context - that's because
(potentially) there are different versions of the selected rows at any
particular moment. Now, IB6 is different from previous versions, in that
you *can* have a read-only database file, e.g. on CD-ROM. I don't know
exactly how this works...but if the entire database is read-only you won't
have to worry about explicit transaction control at all. Use IB_Connection
in preference to IB_Database, since for read-only IB_Connection provides
all you need with less overhead. IB_Database is just for compatibility
when people are converting directly from a BDE implementation.

Just use IB_Connection's default transaction. I'm pretty sure that, when
the DB is read-only, OAT doesn't matter at all, because nothing is changing
in the database so there is no garbage collection; and readers don't block
other readers.


All for Open and Open for All
InterBase Developer Initiative ยท