Reading Unicode from Access with ADO




Hi,

I'm trying to read Unicode data from an Access 2003 table into a D7 app. The data is in a Memo field (but I have also tried Text) and I'm using a TADODataSet to access the table (the connection string is "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\data\import.mdb;Persist Security Info=False").

The string I'm attempting to read is "Krzy?ańska", but I'm getting the following results:

This code:

UStream := TUnicodeStream.Create(''); // UnicodeStream is a descendant of TStream written by my predecessor
(ADODataSet1.FieldByName('field') as TBlobField).SaveToStream(UStream);
TntLabel.Caption := UStream.DataString;
UStream.Free;

produces "態慴穲湹azyna". If I use UTF8Decode(UStream.DataString) then the output is "????azyna".

After reading through the newsgroups and Google, I tried:

TntLabel.Caption := ADODataSet1.Recordset.Fields.Item[WideString('field')].Value;

However, I've only got this to produce "Katarzyna".

What am I doing wrong? Please forgive me if I'm doing something obvious, I've only just started on ADO after being tied to D4/the BDE for a long time.

Thanks in advance,

Tim
.



Relevant Pages

  • Re: Get Ready For More Google Posters
    ... Google often faster than I can see it on Verizon. ... accessing Google newsgroups, I have to spend a little head scratching ... them come close to the usability of ANY newsreader client. ... Often I decide that the message isn't worth reading and I ...
    (rec.audio.pro)
  • Re: newsgroups will die....
    ... of Google internally, it's underfunded and does not get the more motivated ... I suspect that Usenet newsgroups isn't considered very important by ... "Junk Mail Filter Free" ... If I'm reading a post about sound cards, I'll likely see a link to M- ...
    (rec.audio.pro)
  • Re: help, please, newsgroup readers for this newsgroup
    ... The best thing about reading it from google is that you can make ... cross-posted to 10 of the newsgroups ... download select newsgroups for reading and responding offline. ...
    (rec.travel.cruises)
  • Re: WARNING: Industry is Blogging These NewsGroups to Impact the Public Discourse on Matters of Publ
    ... people reading these newsgroups than is realized. ... Google itself archives the comments which means they can reappear any ...
    (misc.health.alternative)
  • Re: O/T News readers
    ... registered with motzarella.org but only a few newsgroups seem to be ... Reading through google ... Any ideas which other newsreaders I can use? ...
    (uk.rec.competitions)