Hi Ikar,
Have you look to this problem ?
When calling the TMyquery.FieldDefs.Update method, a new connection is created. It seems that the TMyquery.Connection isn't used.
Thank you.
TMyquery.FieldDefs.Update create new connection : how to solve this bug ?
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
I can understand that a new connection is made but :
Why killing the current (unique) active connection ???
This lead to :
- loose all temporary tables
- loose all my user variable
These things are connection based ! IMPOV this isn't a reliable solution
how large do you expect this ? Doing an update fieldef doesn't retreive megabits !!! Really, I don't understand thatIf the statement returns large amount of data
Mainly problem is that FieldDefs.Update won't work with TEMPORARY tables, on new connection it won't find that table, since they are Connection based.
Solution is to use the same connection of the query. Btw why should it load huge amounts of data ? Mainly it should only get field structures.
regards
Solution is to use the same connection of the query. Btw why should it load huge amounts of data ? Mainly it should only get field structures.
regards
> Why killing the current (unique) active connection ???
Current connection remains active. MyDAC create new connection to describe fields only.
> Btw why should it load huge amounts of data ? Mainly it should only get
> field structures.
To describe fields MySQL protocol requires executing query and then fetch all requested data. So, to prevent fetching we need to close connection.
This behavior was made to fix bug with describing statements, which returns huge amount of data. For example, some users tried to describe such statement on design-time and as result, IDE had not responded until all data was fetched.
We will try to enhance this algorithm, but we can't say anything about when we can do that.
Current connection remains active. MyDAC create new connection to describe fields only.
> Btw why should it load huge amounts of data ? Mainly it should only get
> field structures.
To describe fields MySQL protocol requires executing query and then fetch all requested data. So, to prevent fetching we need to close connection.
This behavior was made to fix bug with describing statements, which returns huge amount of data. For example, some users tried to describe such statement on design-time and as result, IDE had not responded until all data was fetched.
We will try to enhance this algorithm, but we can't say anything about when we can do that.