Sorting results the API way (was:RE: (no subject))

Sims, John ayu8 at cdc.gov
Thu Aug 4 08:09:36 CDT 2005


> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Ruslan Zasukhin
> Sent: Thursday, August 04, 2005 3:11 AM
> To: valentina at lists.macserve.net
> Subject: Re: (no subject)
> 
> On 8/4/05 9:57 AM, "Jules Jacquot" <jules.jacquot at wanadoo.fr> wrote:
> 
> >> Something as:
> >> 
> >>     setAll = tblDads.SelectAllRecords()
> >> 
> >>     setAllSorted = tblDeads.Sort( setAll, "Nomprenom", "Payemois" )
> > 
> > 
> > sorry ruslan it doesn't work
> > 
> > i get this message about sort
> > 
> > parameters are not compatible with this function
> 
> Jules, this is "something as".
> 
> Please look into docs how correctly call the sort() function.
> If problems let me know
> 
> 
> --
> Best regards,
> 
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
> 

Jules,

I think this will work.  This is off the top of my head and not tested.

	dim siNomprenom as VSortItem
	dim siPayemois as VsortItem

	siNomprenom = new VSortItem("Nomprenom")
	siPayemois = new VSortItem("Payemois")	

	setAll = tblDads.SelectAllRecords()

	setAllSorted = tblDads.Sort(setAll, siNomprenom , siPayemois)

This should return a VArraySet so make sure setAllSorted is dimmed as a
VArraySet.

I hope this works for you.  If not, I'll look at my code when I get home
tonight and give you an example that I know works.

Take care.

-John




More information about the Valentina mailing list