Board index » delphi » Re: Transaction

Re: Transaction


2004-11-06 06:55:19 AM
delphi214
"Feza" <------>writes:
Quote
Hi friends,

in my project, i am using 20 forms.All of them have TDBLookUp component on
it.I have to look for a value from the same table on every form.In this
case, I always have to start seperate transaction to just select a value
from the table.So there seem to be 20 or more transaction.I sometimes get
message about locking.What is the maximum transaction limit should be do you
think in second?

Since most lookup tables are static in nature, I would fill a
clientdataset at startup with the lookup fields and for each form
clone a cursor to the master dataset to drive the lookup combo
boxes on those forms. No additional DB resources needed.
You lock problem has nothing to do with the lookups and
everything to do with you having two transaction both try to
change the same record. This could be caused by transaction that
update a lot but you forget to commit.
Quote

With Regards
Feza


 
 

Re: Transaction

Hello,
As to initiate two separate transactions in the ADOConnection1?
Marcio
 

Re: Transaction

In OLEDB terms ADO connection represents Session object, not DataSource. To
have two separate transactions, use 2 connection objects - in this case
OLEDB DataSource will be pooled and each connection will represent separate
Session object.
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Marcio" <XXXX@XXXXX.COM>сообщи?сообщила ?новостях следующе?
Quote
Hello,

As to initiate two separate transactions in the ADOConnection1?


Marcio




 

Re: Transaction

thanks,
It functions, but it is delayed to open some connections.
"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>escreveu na mensagem
Quote
In OLEDB terms ADO connection represents Session object, not DataSource.
To
have two separate transactions, use 2 connection objects - in this case
OLEDB DataSource will be pooled and each connection will represent
separate
Session object.

//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Marcio" <XXXX@XXXXX.COM>сообщи?сообщила ?новостях следующе?
news:XXXX@XXXXX.COM...
>Hello,
>
>As to initiate two separate transactions in the ADOConnection1?
>
>
>Marcio
>
>
>
>


 

Re: Transaction

Hi,
D7 + IBX 7 + ClientDataset;
I want to use a transaction to commit changes in 4 datasets, but the problem
is that with IBX each ibquery must have it is own ibTransaction. so how can I
use a transaction to handle muti datasets.
thanks
 

Re: Transaction

That is not correct. You can use a single IBTransaction as long as its
AutoStopAction property is set to saCommit.
--
Bill Todd (TeamB)
 

Re: Transaction

Quote
That is not correct. You can use a single IBTransaction as long as its
AutoStopAction property is set to saCommit.
When i use a single ibTransaction for multi datasets i had another problem.
Modifications after ApplyUpdates can't be seen by other transactions till
I close the the ClientDataset or i explicitelly call ibTransactoin.commit
 

Re: Transaction

If you start the transaction you must commit it. If there is no
transaction active when you call ApplyUpdates the DSP will start one
automatically and the DSP will automatically commit the transaction if
AutoStopAction is set to saCommit.
--
Bill Todd (TeamB)