[V4RB] Different results with SQL and BaseObject
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Apr 15 08:54:01 CDT 2003
on 4/15/03 12:36 AM, Christer Olsson at christer at ljusaideer.se wrote:
Hi Christer,
> When storing strings containing ASCII > 127 I get different results when using
> SQLExecute and BaseObject Record methods. I'm storing values entered by the
> user in editfields, and I convert them to MacRoman before storing them with:
>
> s = convertEncoding(value, encodings.macRoman)
>
> This will store a "raw" UTF string in the database:
>
> recCount = app.mEOrderDatabase.SQLExecute("UPDATE Installningar SET varde_fld
> = '" + s + "' WHERE namn_fld = " + falt)
>
> But this will store MacRoman encoded strings:
>
> app.mEOrderDatabase.mInstallningar.vardeFld.SetString(s)
> app.mEOrderDatabase.mInstallningar.namnFld.SetString(falt)
> app.mEOrderDatabase.mInstallningar.AddRecord
>
> i.e if the Editfield.text is "Lösenord" the SQLExecute will store "Lsenord",
> but the BaseObject method will store "Lösenord".
1) so which is wrong ?
It seems to me SqlExecute()?
But if you give it MacRoman string then it do not convert it self to
UTF! Valentina do not know about UTF yet. May be problem in wrong language
property ?
2) what language you use for that field ?
--
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
-------------------------------------------------------------
More information about the Valentina
mailing list