Paradox Community

Items in pnews.paradox-programming

Subject:setAnswerFieldOrder( arFields )
Date:Tue, 1 May 2018 19:11:25 +1000
From:Robert MacMillan <macfam@bigpond.net.au>
Newsgroups:pnews.paradox-programming
This might be useful for someone. The Query setAnswerFieldOrder example 
does not work but here is how to do it. It is probable, yet to check 
that you can do the same thing with setAnswerSortOrder as well.

So what this does is returns an answer table from fields in the query 
table in the order

Race_Date, Track_Code, Track_Name, Race_Number, Horse_Name, Tab_No

in the order

Race_Date, Track_Code, Race_Number, Tab_No, Track_Name, Horse_Name

For me very useful.

method run(var eventInfo Event)

var

    q  Query
    arFields  Array[] String

endVar

    q.readFromFile( "Test1.qbe" )
    arFields.grow(6)
    arFields[1]="Race_Date"
    arFields[2]="Track_Code"
    arFields[3]="Race_Number"
    arFields[4]="Tab_No"
    arFields[5]="Track_Name"
    arFields[6]="Horse_Name"

    q.setAnswerFieldOrder( arFields )
    q.executeQBE()

endMethod


Copyright © 2004 thedbcommunity.com