Article View: borland.public.cppbuilder.database.ado
Article #2388Re: Unicode problem...
From: M. Noroozi Eghbali
Date: Sun, 06 Jul 2003 15:39
Date: Sun, 06 Jul 2003 15:39
81 lines
3227 bytes
3227 bytes
Thank you for your answer. I converted it to C++:
-----------------------------------
ADODataSet1->First();
V = ADODataSet1->Recordset->Fields["FieldName"];
if(!V)
String = "";
else
String = (WideString)VarAsType(&V, varOleStr);
------------------------------------
But I don't know what I have to put for FieldName (Second line). When I put
"USE", I got this error message: "E2094 Operator +' not implemented in type
'_di_Fields' for arguments of type 'char *'"
Thanks,
Mehrdad
"sharon oknin" <sharon@benarit.com> wrote in message
news:3f080f7b@newsgroups.borland.com...
> I had the same problem with hebrew , access the data throw the Recordset
of
> the DataSet .
>
> var
> v: OleVariant;
> str: WideString;
> begin
> ADOQuery1.First();
> v := ADOQuery1.Recordset.Fields['FieldName'].Value;
> if not VarIsNul(v) then
> str := VarAsType(v, varOleStr)
> else
> str := '';
> End;
>
> sharon oknin
>
> "M. Noroozi Eghbali" <galaxy@irandoc.ac.ir> wrote in message
> news:3f07078e@newsgroups.borland.com...
> > Hi,
> >
> > I saved a Unicode string to a MS-Access file but I could not retrieve it
> > correctly. would you please tell me what is wrong in these few commands:
> >
> >
>
//--------------------------------------------------------------------------
> > ----------
> > //(TntEdit1 and TntEdit2 are Unicode components)
> > ADOCommand1->CommandText = "INSERT INTO Thesaurus (LineNum, USE) VALUES
> > (1000031, :USE)"; //Integer, Memo
> > ADOCommand1->Parameters->ParamByName("USE")->Value = TntEdit1->Text; //
a
> > Unicode string - English + Russian
> > ADOCommand1->Execute();
> >
> > ADOCommand1->CommandText = L"SELECT * FROM Thesaurus WHERE LineNum =
> > 1000031";
> > ADODataSet1->Recordset = ADOCommand1->Execute();
> > TntEdit2->Text = ADODataSet1->FieldByName("USE")->Value; //The Russian
> part
> > is shown like ??????????
> >
>
//--------------------------------------------------------------------------
> > -----------
> >
> >
> > When I see the record by using MS-Access, the USE field contains both
> > English and Russian languages correctly. What should I do?
> >
> > Thank you,
> > Mehrdad
> >
> >
> >
>
>
Technical Details
Message-ID:
<3f0841d9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f07078e@newsgroups.borland.com> <3f080f7b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,991da78fb4c9f597 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-07-06 08:40:08 PST From: "M. Noroozi Eghbali" <galaxy@irandoc.ac.ir> Newsgroups: borland.public.cppbuilder.database.ado References: <3f07078e@newsgroups.borland.com> <3f080f7b@newsgroups.borland.com> Subject: Re: Unicode problem... Date: Sun, 6 Jul 2003 20:09:29 +0430 Lines: 83 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 NNTP-Posting-Host: 213.176.21.5 Message-ID: <3f0841d9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1057505753 213.176.21.5 (6 Jul 2003 08:35:53 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail