Subject Other doubts with transactions
Author Salvatore Besso
hello all,

I'm still experimenting with Firebird in the hope that sooner or later
I will not need to ask questions any more :-)

My current practice is to use an explicit transaction only when I make
changes to a table, but I often see that people here speak of
transactions also for simple select's. Now this is what I do:

1. Open a table with, for example, a simple 'select * from table'
2. start a transaction if I have to modify it
3. commit or rollback (hard)

As you can see, I never start a transaction when I simply open the
query for browsing. Then my questions are:

1. Do I have to start a transaction also for opening the query?
2. If yes, can I start it before the query is open?
3. If yes again, a commit or rollback will commit or rollback the
query opening as well, so I have to open it again, right?
4. Do I really need all this, or is the default transaction of the
connection taking care of the query opening letting me play with my
explicit transaction only during changes not worrying of opening?
5. If yes for 4., closing the query will commit (or rollback?) the
default transaction as well, right?
6. Are there any special cases when I DO have to explicitly start a
transaction for a simple query open for browse (no edit)?

That's all. Sorry if my English is not very clear... but I hope you
have understood what I asked for :-)

Regards
Salvatore