Article View: borland.public.cppbuilder.database.ado
Article #790Re: GetEnumName with C++Builder
From: Viatcheslav V. Vassiliev
Date: Sun, 24 Apr 2005 07:20
Date: Sun, 24 Apr 2005 07:20
38 lines
2155 bytes
2155 bytes
Add .pas unit to your project with this function and call it from C++
Builder.
//------------------------------------------
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)
"Rainer Welzel" <master@fgg-welzel.de> �������/�������� � ��������
���������: news:426b481c$1@newsgroups.borland.com...
> Hi,
> I get a Delphi CodeSample:
> "Navigating and Editing a ClientDataSet" by Cary Jensen
> http://community.borland.com/article/0,1410,29122,00.html
>
> I failed to convert the following delphi Statement to C++Builder:
>
> GetEnumName(TypeInfo(TDataSetState),
> Ord(ClientDataSet1.State));
>
>
> My Code is:
>
> PPropInfo PropInfo =
> GetPropInfo(PTypeInfo(ClassInfo(__classid(TADOTable))),"State");
> if (PropInfo){
> StatusBar1->Panels->Items[1]->Text =
> "State = " + GetEnumName(*(PropInfo->PropType),
> int(ADOTable1->State));
> }
>
> thx for your help
> Rainer
>
>
Technical Details
Message-ID:
<426b489e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!msrn-out!msrn-in!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<426b481c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,836a61d51ca53eb8,start X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <426b481c$1@newsgroups.borland.com> Subject: Re: GetEnumName with C++Builder Date: Sun, 24 Apr 2005 11:20:00 +0400 Lines: 40 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: <426b489e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114327198 85.93.138.132 (24 Apr 2005 00:19:58 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!msrn-out!msrn-in!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail