Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save Unicode data to Mysql
Message
De
02/04/2016 09:53:38
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
02/04/2016 01:06:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Database:
MySQL
Divers
Thread ID:
01634182
Message ID:
01634195
Vues:
33
>G'day
>
>I try to save unicode data to Mysql Server by using :
>
>=SYS(3101,65001)
>=SYS(987, .F.)
>
>mName = STRCONV(THISFORM.olecontrol2.text,12)
>mName = CREATEBINARY(mName)
>
>
> SQLEXEC(m.lnConn, "INSERT INTO testunicode (name) VALUES (CAST(?mName AS CHAR(100) ))")
>
>
>But it seem the code cant work correctly.
>
>Any advise?
>
>Thank and regards in advance.

Perhaps if you first make it binary and then store a binary value into it? Or have a cursor with a binary (i.e. nocptrans) memo field and store the value in it and then insert straight from that cursor?

Also, seeing that you're using an olecontrol - perhaps the olecontrol2.text is already unicode and you converted it again? Check that in the debugger.

And see what's the character set of that field in your target table - is it unicode or perhaps utf-8? Then you'd have to have a strconv(strconv(value, 6), 2) (or 2 inside and 6 outside - don't remember exactly).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform