[V4RB] Re: Unicode workaround via UTF-16 - problems

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Nov 7 11:14:05 CST 2003


on 11/7/03 10:23 AM, Dave Addey at dave.addey at dsl.pipex.com wrote:

> So, I've switched to using VVarBinary rather than VVarChar for fields where
> I want to store my UTF-16 data.  My problem comes when I try and sort on
> these fields.  If I do the following:
> 
> Dim DBrec as VCursor
> DBrec = LibraryDB.SQLSelect("select * from ImportedSongs order by Album,
> TrackNumber")
> 
> ...where Album is a VVarBinary(512) and TrackNumber is a Vlong, then my RB
> application crashes when trying to execute this statement, even with only
> one record in the ImportedSongs table.
> 
> If I remove the "Album" field from the "order by" clause, then the query
> works fine.
> 
> I have tried creating the Album field with and without indexing, and it
> doesn't seem to make a difference.

> I create the Album field in the constructor of my ImportedSongs object:
> 
> Name = "ImportedSongs"
> Album = New VVarBinary("Album", 512)
> 
> Any idea what I'm doing wrong?  Is it possible to order by VVarBinary
> fields?  The crash is very unfriendly when I try ;-)
> 
> FYI, I've updated to REALbasic 5.2.2 and Valentina 1.9.8 (for RB5).

Ops, it seems I have give you wrong info.
Binary can fields CAN store data.

But since this is BINARY fields, Valentina DO NOT index then, and there fore
cannot sort. Because sort algorithm of Valentina use index.

Hmm, then I afraid we do not have a way.
String field cannot store data with ZERO inside.
Binary cannot sort...

-- 
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://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list