Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: FDTable initial query


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Mar 29, 2017 11:00 PM Last Post By: Dmitry Arefiev
Sam G

Posts: 1
Registered: 4/29/17
FDTable initial query  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 29, 2017 3:56 AM
Hi all.

I have noticed that, when using TFDTable on IB/FB and doing the inital Open(), on large tables the "internal" query ("SELECT A.*, A.RDB$DB_KEY AS FD__DB_KEY FROM ATABLE A") stays active in the database (table MON$STATEMENTS) with in a "stalled" state (MON$STATE=2).
As discussed in the FD documentation (http://docwiki.embarcadero.com/RADStudio/Berlin/en/Unique_Identifying_Fields_(FireDAC)), I have tried disabling fiMeta from FetchOptions.Items and manually adding the PK columns to UpdateOptions.KeyFields but that doesn't seem to have an impact.
Is this the expected behavior?

Edited by: Sam G on Mar 29, 2017 3:56 AM
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FDTable initial query  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 29, 2017 11:00 PM   in response to: Sam G in response to: Sam G
Initial SQL query remains open after TFDTable.Open. And the result set will be fetched if to call TFDTable.Next.
If to perform TFDTable.Last, First, etc calls, then initial query will be closed and additional queries will be executed.

--
With best regards,
Dmitry
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02