No Unicode in DAO recordset

A

Axel Dahmen

Hi,

I've imported a table from MS SQL Server containing characters beyond ASCII.
When I open this table from within Access, all characters appear correctly.
But if I open a DAO Recordset, these characters have been converted into
ASCII characters. (e.g. 0x11F becomes 0x67)

How can I cope with this?

TIA,
Axel Dahmen
 
S

Sylvain Lafontaine

Did you have set the Unicode compression feature for this field? If yes,
than try with no.

Also, what is the version of Access that you are using and how are you
opening your recordset and displaying the result?

S. L.
 
A

Axel Dahmen

Meanwhile I've learned from another newsgroup that the Recordset contains
correct data but that the Debugger window and Tooltips can't display Unicode
strings.

My problem is that I've written an Access module to create a text file to
contain the data I get from the Recordset. It seems that Access can only
create ANSI files but no Unicode files.

Do you perhaps know some solution I could use?

TIA,
Axel Dahmen


PS.: Here's an excerpt from the VBA-Script I have written:

Open filepath For Output Lock Read Write As #lfn

Set rsa = DBEngine(0)(0).OpenRecordset("SELECT ID,Bezeichnung FROM
Anbieter ORDER BY ID", ...)
Do Until rsa.EOF
Print #lfn, rsa!Bezeichnung; " ---------------------"
...
rsa.MoveNext
Loop

Close lfn






-----------
 
S

Sylvain Lafontaine

If you want to write in Unicode with VBA, my feeling would be that you must
write in binary mode; not in Text mode.

You can also convert from Unicode to your local code page. The following
piece of code give you all the functions needed:
http://www.trigeminal.com/code/InCodePage.bas .

You also have the possibility of interfacing your access application with
..NET, which offers a much greater support for Unicode and Localization.

For the rest, you should repost your question in this newsgroup.

Happy new year!
S. L.
 
Top