|
-
April 14th, 2003, 01:08 AM
#1
Converting ANSI to Unicode with VB(A)
Hi everybody.
I have to convert strings in an Access 2000 database into Unicode strings. I tried the following code:
Set daoCursorDB = CurrentDb
Set daoCursorRS = daoCursorDB.OpenRecordset("SELECT * FROM TextItems WHERE LangCode=38")
Do Until daoCursorRS.EOF
szAnsiText = daoCursorRS!Text 'i.e. "ÐÓÑÑÊÈÉ"
szUnicodeText = StrConv(szAnsiText, vbUnicode, 1049) 'i.e. "РУССКИЙ"
daoCursorRS.Edit
daoCursorRS!Text = szUnicodeText
daoCursorRS.Update
daoCursorRS.MoveNext
Loop
The result of the code above is that only the first character of the unicode string is stored in the mdb.
Can anyone help me with this?
P.S. I tried SQL-UPDATE to store the converted strings, but that doesn't work either.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|