🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by Rainer Welzel Sun, 24 Apr 2005 07:17
GetEnumName with C++Builder
#791
Author: Rainer Welzel
Date: Sun, 24 Apr 2005 07:17
23 lines
1538 bytes
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
Re: GetEnumName with C++Builder
#790
Author: Viatcheslav V. Vassiliev
Date: Sun, 24 Apr 2005 07:20
38 lines
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
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads