[V4RB] SQL Queries/RB5.1/Unicode

Stan R. Busk maxprog at mac.com
Sun Apr 27 00:46:13 CDT 2003


Hi,

Yes, you're right converting the whole query works fine...
MyDatabase.SQLselect(ConvertFromUTF8(mySQLQuery, encodings.MacRoman)) 
works fine on RB5.

so if you don't want to use Unicode with RB5 and Valentina, it is just 
a matter of converting RB entry fields to MacRoman this way:

MyDatabase.myTable.myField.SetString(ConvertFromUTF8(myString, 
encodings.MacRoman))

Anyway I think it would be better using Unicode everywhere.

Stan

> I use German with ASC>127 it doesn't worked here So I use 
> meineDatenbank.TUserDB.FirstName.value= 
> ConvertText(EditField1.text.trim, GetTextEncoding(0)) and when I have 
> an Cursor I use
> Cursor = database.SQLSelect(ConvertText(SearchString, 
> GetTextEncoding(0))) then this workes, too.
> When I fill in an EditField some database.varchar I don't convert 
> because RB is doing that EditField1.text= DB.Table.Field.GetString 
> with this way I can also open databases created with RB 4.5.3
> bye - Claudius
>
> Am Freitag, 25.04.03 um 20:42 Uhr schrieb jda:
>
>>> Hi,
>>>
>>> I have tried both methods unsuccessfully. The query works fine as 
>>> long as the queried valentina vvarchar field doesn't contain any 
>>> accented characters. For example one record contains the word 
>>> 'metá'. If you look for records containing 'met' velentina returns a 
>>> cursor with the correct record. If you then look for 'metá', 
>>> resulting cursor comes empty. Both words 'met' and 'metá' are taken 
>>> from an edit field. There is no change if I try to convert from UTF8 
>>> to MacRoman, or guessing both encodings first or to default system 
>>> encoding (0).
>>
>> I just did this:
>>
>> 1. Entered text into an RB 5.1fc4 editfield as "metá"
>> 2. Save to a Valentina db TEXT field with language set to English
>> 3. Search -> select * from references where thefield = 'metá'
>>
>> and found that reference.

-- 
MAX Programming, LLC
<http://maxprog.com>



More information about the Valentina mailing list