[DUG] Firebird connections / queries / transactions

Rohit Gupta rohit at cfl.co.nz
Thu Jul 28 11:00:47 NZST 2005


A readonly table is RO for the end user but not as far as the Firebird 
is concerned.  It looks at the transaction type.  You can do a select 
with a normal default transaction that IBO or IBX or whatever put 
on.  This is what most people do when they start.  But this is not 
read only... it leaves the transaction open for edit/insert/delete.  

You need to mark the transaction inside the table/query 
appropriately.  I dont remember the official names as we always use 
subclassed components.  In these we make the table.readonly do 
the right thing.  We also rename the IBO's IB_Transaction to 
Transaction to make it more component neutral.  We also allocate a 
new transaction inside it if it has not been assigned by the 
programmer.  So that it never uses the default transaction.


Date sent:      	Thu, 28 Jul 2005 10:48:08 +1200
From:           	Phil Middlemiss <phil at tumonz.co.nz>
Organization:   	MTS Ltd
To:             	NZ Borland Developers Group - Delphi List <delphi at ns3.123.co.nz>
Subject:        	Re: [DUG] Firebird connections / queries / transactions
Send reply to:  	NZ Borland Developers Group - Delphi List <delphi at ns3.123.co.nz>
	<mailto:delphi-request at ns3.123.co.nz?subject=unsubscribe>
	<mailto:delphi-request at ns3.123.co.nz?subject=subscribe>

[ Double-click this line for list subscription options ] 

Thanks for the overview. By "read-only" transactions, are you referring 
to the SQL executed within a transaction? Your comment about the default 
transaction not being read-only has me puzzled - isn't it the table 
itself that is readonly?

Phil.

Rohit Gupta wrote:

>Readonly transactions do not contribute to this problem.  Note that 
>both the table/query and the transaction has to be readonly.  
>WARNING - Do not use the default transaction as it is not readonly 
>and was the cause of our problems.
>  
>
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
Regards

Rohit

======================================================================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email rohit at cfl.co.nz  or  r.gupta at xtra.co.nz
======================================================================




More information about the Delphi mailing list