Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving unicode data
Message
 
 
À
26/12/2011 13:17:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01531693
Message ID:
01531702
Vues:
54
>>>You might look at this http://www.west-wind.com/presentations/foxunicode/foxunicode.asp
>>>
>>I actually read this article couple of times, but I still can not achieve the desired result.
>>
>>I have data correctly saved in the nvarchar(100) fields. In SSMS I can do
>>
>>update dbo.Prefs_sl set language00 = N'ʕʒϿ'
>>
>>and all is well.
>>
>>Now, in VFP I retrieve the data using
>>
>>select cast(language00 as varbinary(max)) as language00
>>
>>So far so good. I created a class with MS Forms2 ActiveX control and I can directly assign that prefs_sl.language00 to the control. See attached screen.
>>
>>However, I can not figure out how to save it back. I've tried various code from the article and so far nothing worked.
>>
>>May be someone can try the same experiment as I did and tell me what I'm missing?
>>
>>Here is what I tried in the Change event of the control:
>>
>>
>>LOCAL lcText
>>lcText = STRCONV(this.Text,10) 
>>=MESSAGEBOX(m.lcText)
>>lcText = CREATEBINARY(m.lcText)
>>=MESSAGEBOX(m.lcText)
>>_cliptext = m.lcText
>>replace (this.parent.LanguageField) WITH m.lcText
>>
>>I've tried strconv(this.text,11) also.
>>
>>Thanks in advance.
>
>
>Why would you convert it back ?
>
>If you assign it the data from the table, and it displays well, then the format is ok - I'd say

This is what I get if I directly assign the Text to the field and then attempt to save as convert(nvarchar(100), ?myField)

(See attached). The third textbox is what I actually pasted.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform