Problem with FetchAll = False and transactions

Problem with FetchAll = False and transactions

Postby tmezzena@gmail.com » 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.
tmezzena@gmail.com
 
Posts: 6
Joined: Fri 16 Dec 2005 22:33

Postby Ikar » Wed 04 Jan 2006 14:38

It's impossible due to MySQL server protocol restrictions. You can read details in MyDAC help.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby tmezzena@gmail.com » 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.
tmezzena@gmail.com
 
Posts: 6
Joined: Fri 16 Dec 2005 22:33

Postby Ikar » Fri 06 Jan 2006 10:43

> Could I have future problems?

Yes, it's possible. MyDAC wasn't developed to work in this situation.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby tmezzena@gmail.com » 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.
tmezzena@gmail.com
 
Posts: 6
Joined: Fri 16 Dec 2005 22:33

Postby Ikar » Tue 10 Jan 2006 12:22

Try to use MyConnection.Pooling.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components