ORDER BY

Rick Robinson rickrobinson at attbi.com
Thu Jan 23 10:44:45 CST 2003


Okay, in my "recipes" base object in RB, I've defined a property like 
this:

   nameSortField as VVarChar

And, in the constructor method I've got the following definition:

   nameSortField = new VVarChar("nameSort_fld",80, "ASCII",KV_Indexed)
   nameSortField.SetMethod("Upper(rname)")

Where "rname" is the VarChar field in the table that contains the name 
of the recipe.

Now, when I do the following query:

   c = new vCursor(myDataBase,"select RecID,* from recipes where 
type_fld = 'Dessert' ORDER BY cuisine_fld, nameSort_fld")

I get an empty cursor. If I remove the "nameSort_fld" from the ORDER BY 
list, then I get the right records (some 97 of them) in the cursor.

What gives?

Rick



On Thursday, January 23, 2003, at 10:06  AM, Ruslan Zasukhin wrote:

> on 1/23/03 6:41 PM, Rick Robinson at rickrobinson at attbi.com wrote:
>
>> Okay, I'll try this. When I do the ORDER BY statement do I use the
>> field "myFieldSortMethod"?
>
> yes
>
>> Also, since these are methods, does their creation impact the actual
>> database schema? I have an existing database with almost 400 records.
>> Will I need to convert my existing database by adding these methods
>> using Vapp? Or can I just add these as run-time activities in my
>> program?
>
> You can have them always or create/delete on the fly.
> Up to you.
>
>
> -- 
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list go to:
> http://listserv.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://listserv.macserve.net/mailman/listinfo/valentina
>



More information about the Valentina mailing list