Page 1 of 1
Problem with FetchAll = False and transactions
Posted: Tue 03 Jan 2006 22:51
Why does the TMyQuery create a new(internal) connection to get values on FetchAll = False? I've had problems with transactions... I update some values but I can't get them on transaction...
Can I set some property to cancel this creation?
Tato.
Posted: Wed 04 Jan 2006 14:38
by Ikar
It's impossible due to MySQL server protocol restrictions. You can read details in MyDAC help.
Posted: Thu 05 Jan 2006 22:21
Hi,
I create a new class of TMyQuery and I put the code above in constructor create:
Unidirectional := True;
FIRecordSet.SetProp(prCreateConnection, False);
It seems that this solve my problem, but I've not tested it on totality. I'm not using thread and I only open TMyQuery, populate other dataset, and close TMyQuery. I don't connect controls on TMyQuery. Unidirectional(FetchAll=False) property is important to save memory.
Could I have future problems?
Sorry for my poor english.
Thank's
Tato.
Posted: Fri 06 Jan 2006 10:43
by Ikar
> Could I have future problems?
Yes, it's possible. MyDAC wasn't developed to work in this situation.
Posted: Sat 07 Jan 2006 13:22
Hi,
I want to read all data from a big select, consuming less memory as possible, with a good speed. I don't have plugged controls. Resuming: Select, read and close... But I have to use transactions, locks, etc... in this environment.
Which is the best practice for it using MyDac?
Thank's,
Tato.
Posted: Tue 10 Jan 2006 12:22
by Ikar
Try to use MyConnection.Pooling.