Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7825455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:59:20+00:00 2026-06-02T08:59:20+00:00

I found the OnQueryStatement method : procedure TkbmMWQueryService2.kbmMWQueryServiceQueryStatement(Sender: TObject; Place: TkbmMWQueryOperationType; var NamedQueryName, Statement:

  • 0

I found the “OnQueryStatement” method :

procedure TkbmMWQueryService2.kbmMWQueryServiceQueryStatement(Sender: TObject;
Place: TkbmMWQueryOperationType; var NamedQueryName, Statement: string);
begin
   Form1.Memo1.Lines.Add(Statement);//show the query statement
end;

this method can get the client-side query statement,but all the client-side query trigger this event twince!(like the screenshot)!Why? How can i get the client-siade query statement correctly?

thanks in advance! 🙂

p.s. Form1 is the server-side,form3 is the client-side

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:59:22+00:00Added an answer on June 2, 2026 at 8:59 am

    Its called twice on the server (in fact can be called 3 times for the same query on the server in the most far out situation).

    Check the Place argument for the situation that its called in.
    It can be
    mwqotDefinition,mwqotQuery,mwqotExecute,mwqotResolve,mwqotMoreData,mwqotMetaData

    The reason its being called multiple times when opening the query, is that the dataset first likes to get the definition (which fields and parameters will this query result in), and then the data itself.

    Both the server and the client default operates like that. Hence opening a query on the client result the client in asking the server about definitions, then the client asks for the data, and that on the server may result in the server itself asking for definitions and then the data. Remember the server is stateless and default doesnt know anything about previous calls to it.

    There are many ways to optimize this:

    • Enable caching for metadata (definitions). That will result in the cache results being used instead of the server asking the database for the definitions, and enabling the cache on the client too, results in the client not having to ask the server for definitions except first time.

    • Setup the AutoFieldDefs property on the query to mwafoWithData. Then the data will actually be returned at the same time as the definitions, and the 2.nd data fetch call will be skipped.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Found this method of having DIV as custom google maps infoWindow. It works, but
found that code to display html format text to dynamic textfield in as3: var
Found this script: function stopRKey(evt) { var evt = (evt) ? evt : ((event)
I found a bug in the Contains statement in Linq (not sure if it
Found this post that helped me out: Split a string to form multidimensional array
Found this: Sub SurroundWithAppendTag() DTE.ActiveDocument.Selection.Text = .Append( + DTE.ActiveDocument.Selection.Text + ) End Sub But
found this regex: insert every 10 characters: $text = preg_replace(|(.{10})|u, \${1}. , $text); can
Found a piece of code today, that I find a little smelly... TMyObject.LoadFromFile(const filename:
Found this rather strange bug in IE8; element.style.top is limited to 1342177 pixels. Even
Found two libraries Rebex ( www.rebex.net ) and QuikSoft ( www.quiksoft.com ) any comments

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.