Subject | Re: [IBO] IBO 46 in BDS 2006 CBuilder personality (BCB2006) |
---|---|
Author | Gary Benade |
Post date | 2006-02-23T13:58:40Z |
>> Change to Delphi Win32 personalityOk, cancel all that (again)
>> Open IBO40_C2006.bdsgroup
>>
>> for each and every bpl in the group, select Options->Linker->Generate all
>> c++Builder files
>>
>> Compile all and install Design components.
>>
>> Switch to CBuilder personality and compoentns should still be installed
>>
>> The following changes need to be made
>>
>> comment out line 44 in IB_Header.hpp
>>
>> //typedef short short;
>>
>> change line 3854 to 3593 in IB_Components.hpp (original lines commented
>> out
>> below)
>>
>> /* __property Classes::TStrings* SQLSelect = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=1};
>> __property Classes::TStrings* SQLFrom = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=2};
>> __property Classes::TStrings* SQLWhere = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=3};
>> __property Classes::TStrings* SQLGroup = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=4};
>> __property Classes::TStrings* SQLHaving = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=5};
>> __property Classes::TStrings* SQLUnion = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=6};
>> __property Classes::TStrings* SQLPlan = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=7};
>> __property Classes::TStrings* SQLOrder = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=8};
>> __property Classes::TStrings* SQLForUpdate = {read=GetSQLSection,
>> write=SetSQLSection, stored=false, index=9}; */
>> __property Classes::TStrings* SQLSelect[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLFrom[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLWhere[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLGroup[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLHaving[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLUnion[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLPlan[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLOrder[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>> __property Classes::TStrings* SQLForUpdate[TIB_SQLSections index] =
>> {read=GetSQLSection, write=SetSQLSection};
>>
>
> okay, I was having a serious blonde moment. Cancel the above and implement
> the following in IB_Components.hpp (original lines are commented out):
>
> /* int __fastcall GetBegPos(TIB_SQLSections AVal);
> int __fastcall GetEndPos(TIB_SQLSections AVal);
> AnsiString __fastcall GetSQLSection(TIB_SQLSections Index);*/
> int __fastcall GetBegPos(int AVal);
> int __fastcall GetEndPos(int AVal);
> AnsiString __fastcall GetSQLSection(int Index);
>
> /* __property int BegPos[TIB_SQLSections index] = {read=GetBegPos};
> __property int EndPos[TIB_SQLSections index] = {read=GetEndPos}; */
> __property int BegPos[int index] = {read=GetBegPos};
> __property int EndPos[int index] = {read=GetEndPos};
>
> // __property AnsiString Section[TIB_SQLSections index] =
> {read=GetSQLSection};
> __property AnsiString Section[int index] = {read=GetSQLSection};
>
> // Classes::TStrings* __fastcall GetSQLSection(TIB_SQLSections Index);
> Classes::TStrings* __fastcall GetSQLSection(int Index);
>
> // void __fastcall SetSQLSection(TIB_SQLSections Index, Classes::TStrings*
> Value);
> void __fastcall SetSQLSection(int Index, Classes::TStrings* Value);
>
> The __property declarations were correct.
>
> This is a machine generated header so this should be considered a
> temporary
> fix until I can do some more testing.
>
Leave all source code as is, and change IB_Directives.inc
{$IFDEF VER180} // Delphi v2006
{$IFNDEF BCB}
{$DEFINE IBO_VCL2006_OR_GREATER} // Delphi v2005 or greater
{$DEFINE IBO_VCL2005_OR_GREATER} // Delphi v2005 or greater
{$DEFINE IBO_DELPHI_2006}
{$DEFINE IBO_VCL2006}
{$DEFINE IBO_SUPPORTED_COMPILER}
{$DEFINE IBO_CPPB} // <<-- Add this line
{$ENDIF}
{$ENDIF}
Change to Delphi Win32 personality
Open IBO40_D2006.bdsgroup
for each and every bpl in the group, select Options->Linker->Generate all
c++Builder files
Compile all and install Design components.
Switch to CBuilder personality and components should still be installed
Finished testing in both personalities and everything is working.
Regards
Gary