Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Updating Field Definitions Remotely
Tue, Mar 23 2010 8:29 PMPermanent Link

Tony Pomfrett

Hi Tim,

My application needs to stream a remote query to a local computer and as part of that process I call the following procedures in the order shown:

RemoteQuery.FieldDefs.Update;
...
...
Remotequery.Open;

The Delphi help states "Update updates the field definitions without opening the dataset." but it seems to take only half the time if I reverse the order like so:

Remotequery.Open;
...
...
RemoteQuery.FieldDefs.Update;


So what is update doing that it takes just as long to work on a closed query as it does to actually open the query even though it's not supposed to be opening the query?

This query takes quite a while to open so it is quite obvious that the Update process takes just as long as the Open process unless the order of operation is reversed.
Thu, Mar 25 2010 2:32 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tony,

<< The Delphi help states "Update updates the field definitions without
opening the dataset." but it seems to take only half the time if I reverse
the order like so: >>

The Delphi help is wrong on this account.  It is impossible for DBISAM to
get the field definitions without executing the query SQL (think scripts
with multiple statements, for example).

If you're only using a single query, you can workaround this issue by using:

RemoteQuery.MaxRowCount:=0;
RemoteQuery.FieldDefs.Update;
RemoteQuery.MaxRowCount:=-1;

BTW, why are you calling the FieldDefs.Update method before opening the
query ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Image