🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2390

Re: Unicode problem...

#2390
From: Viatcheslav V. Vassiliev
Date: Mon, 07 Jul 2003 06:03
102 lines
3900 bytes
Try Fields[WideString("USE")]

----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.

"M. Noroozi Eghbali" <galaxy@irandoc.ac.ir> �������/�������� � ��������
���������: news:3f0841d9@newsgroups.borland.com...
> 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: <3f090d58$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!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
References: <3f07078e@newsgroups.borland.com> <3f080f7b@newsgroups.borland.com> <3f0841d9@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,991da78fb4c9f597
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-07-06 23:09:14 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3f07078e@newsgroups.borland.com> <3f080f7b@newsgroups.borland.com> <3f0841d9@newsgroups.borland.com>
Subject: Re: Unicode problem...
Date: Mon, 7 Jul 2003 10:03:48 +0400
Lines: 104
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.247.201.57
Message-ID: <3f090d58$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1057557848 213.247.201.57 (6 Jul 2003 23:04:08 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!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