🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO with unicode querys...

#799
From: Viatcheslav V. Vassiliev
Date: Sun, 01 May 2005 20:00
41 lines
2418 bytes
Try this:

 wchar_t* w = L"Insert into t (f1,f2) values ('\u4e01 ','AAA')";
 WideString wS = WideString(w);
 //Set this char again, it seems to be \x01 here.
 //Set breakpoint and see actual value. May be it will be correct for you.
 //Also \u014e seems to be chinese, instead of \u4e01.
 wS[32] = '\u014e';
 ADOCommand1->CommandText = wS;
 ADOCommand1->Execute();

And set ADOCommand1->ParamCheck = false, when parsing parameters VCL 
converts command text to AnsiString.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + 
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Bernd Muent" <kontakt@bmservices.de> ???????/???????? ? ???????? ?????????: 
news:427203b7@newsgroups.borland.com...
> Viatcheslav V. Vassiliev schrieb:
>> Which components do you use? Try use TADOCommand and CommandText - it is 
>> WideString. It seems that somewhere there is convertion AnsiString -> 
>> WideString.
>
> It tried it this way:
> ADOCommand* ac=new TADOCommand(this);
> WideString wS="Insert into test (f1,f2) values ('\u4e01 ','AAA')";
> ac->CommandText=wS;
> ac->Connection=dbConn;
> ac->Execute();
> delete ac;
>
> And this produces an entry "?"/"AAA" in the mdb-Database (viewing in 
> Access, not in CBuilder!).
>
> Greetings, Bernd 
Technical Details
Message-ID: <42753578@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42709d41@newsgroups.borland.com> <42713e9d$1@newsgroups.borland.com> <427203b7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,83edafb77086ec9a
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <42709d41@newsgroups.borland.com> <42713e9d$1@newsgroups.borland.com> <427203b7@newsgroups.borland.com>
Subject: Re: ADO with unicode querys...
Date: Mon, 2 May 2005 00:00:54 +0400
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 85.93.138.132
Message-ID: <42753578@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1114977656 85.93.138.132 (1 May 2005 13:00:56 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail