dear all,
1. it says in the doumentation of MyTable that one need to create a second connection to the MySql server when using fetch all = false.
what to do with this second connection ??? or is it enough if i just keep a second connection hanging around idly ?
2. when using fecth all = false, what exactly happens when i activate MyTable and move from record to record with Next() ? will the program load only those records into memory which are needed and unload as soon as they are not within scope of my cursor ?
3. does anybody have a small example application which is using fetch all = false ?
thanks
uwe
using fetch all = false
Re: using fetch all = false
You should do nothing with the second connection. MyDAC manages it itself. MyDAC Dataset initiates creating this connection on opening in FetchAll=False mode, uses it to fetch records asynchronous, closes it when all records are fetched.uwe wrote: 1. it says in the doumentation of MyTable that one need to create a second connection to the MySql server when using fetch all = false.
what to do with this second connection ??? or is it enough if i just keep a second connection hanging around idly ?
uwe
When you open a dataset in FetchAll=False mode, it fetches several records (use the FetchRows property to specify records count to fetch in one fetch operation). If you try to browse records that are not already cached, TMyQuery fetches on more batch of records, etc.uwe wrote: 2. when using fecth all = false, what exactly happens when i activate MyTable and move from record to record with Next() ? will the program load only those records into memory which are needed and unload as soon as they are not within scope of my cursor ?
uwe
Take a look at the Query demo that is a part of MyDACDemo.uwe wrote: 3. does anybody have a small example application which is using fetch all = false ?
uwe
-
digdagdigedag
- Posts: 6
- Joined: Wed 18 Apr 2007 10:52
i checked all Apps of MyDacDemo but could not find anyone using FetchAll = falseTake a look at the Query demo that is a part of MyDACDemo.
should i simply place a second TMyConnection component, clone all the properties from the first one, activate and leave it running without connecting it to any other component ?
thanks
uwe
There is the check box that manages FetchAll mode for the query in the Query demo. If this check box is unchecked, MyQuery works in FetchAll=False mode.uwe wrote:i checked all Apps of MyDacDemo but could not find anyone using FetchAll = false
No, you should do nothing. This is done by MyDAC automatically.uwe wrote:should i simply place a second TMyConnection component, clone all the properties from the first one, activate and
leave it running without connecting it to any other component ?