Article View: borland.public.cppbuilder.database.ado
Article #2391Re: Unicode problem...
From: M. Noroozi Eghbali
Date: Mon, 07 Jul 2003 06:22
Date: Mon, 07 Jul 2003 06:22
128 lines
4672 bytes
4672 bytes
Thank you Viatcheslav but I could not resolve the problem. The error message
is "Invalid Pointer Addition".
-----------------------------------
> > ADODataSet1->First();
> > V = ADODataSet1->Recordset->Fields[WideString("USE")];
> > if(!V)
> > String = "";
> > else
> > String = (WideString)VarAsType(&V, varOleStr);
> > ------------------------------------
Mehrdad
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:3f090d58$1@newsgroups.borland.com...
> 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:
<3f0910bc@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!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> <3f0841d9@newsgroups.borland.com> <3f090d58$1@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:39:19 PST From: "M. Noroozi Eghbali" <galaxy@irandoc.ac.ir> Newsgroups: borland.public.cppbuilder.database.ado References: <3f07078e@newsgroups.borland.com> <3f080f7b@newsgroups.borland.com> <3f0841d9@newsgroups.borland.com> <3f090d58$1@newsgroups.borland.com> Subject: Re: Unicode problem... Date: Mon, 7 Jul 2003 10:52:12 +0430 Lines: 130 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: <3f0910bc@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1057558716 213.176.21.5 (6 Jul 2003 23:18:36 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail