Get Unicode Text From Access DB in VB

Hi,

I'm using a database I created in MS Access XP. From a VB 6.0 application I connect to my databse using
MS Jet 4.0 engine. My database contains tables with text fields that contain unicode characters.
When I try to get these records from the database all the unicode characters are replaced with '?'s

I already checked the controls in VB and they can display unicode characters. The problem is that I get
the text from the database already messed up.

Who can I get this text right? Do I need to change the engine I use to connect to the database?
Do I need to configure the fields in my DB differently?

Tanks in advance,
Nisim Aytek.
aytek_nisiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yaron_herskovitzCommented:
This is a test comment
0
harfangCommented:
First, we should make sure whether you get unicode from Access or not.
Using a DAO or ADODB recordset, retrieve a string for which you know there is an extenden character at position n. Extract that to a string variable. Example:

    Dim strTest as String
    strTest = Mid(recTable.Fields(2).Value, 5)

This would store a string starting with the fifth character of the third field into the variable. I can guarantee that the Field object does return a unicode enabled string (i.e. an array of integers, not bytes). Now observe this in the immediate pane:

    ? AscW(strTest)

If you get 63, this is no longer Unicode. If it is higher than 255, the problem is not with the JetEngine or the database. If you *do* get 63, it might be worthwile to write unicode into the table, for example ChrW(916) should be the greek upper-case delta (a triangle). Write that into a field, and read it back. If you can do that, it means that the data was flattened to 8-bit before entering the table...

As for enabling Unicode data in a VB control, you should ask in the VB channel. The only advice here would be to build a unicode string (using ChrW(913) & ChrW(914) & ... for a greek alphabet) and to assign that to an unbound control. If that shows, Unicode can be displayed.

Good Luck!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.