Paradox Community

Items in pnews.paradox-programming

Subject:Re: setAnswerFieldOrder( arFields )
Date:Tue, 1 May 2018 09:22:08 -0700
From:Peter <peter@whiteknight.email>
Newsgroups:pnews.paradox-programming
Hey thanks Robert, I never knew about setAnswerFieldOrder/SortOrder. I 
could have used that in a couple instances in the past, would have made 
my life easier.

Peter

On 05/01/2018 02:11 AM, Robert MacMillan wrote:
> 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