TDBGridEhExportClass ExpClass;
ExpClass=TDBGridEhExportAsXLS().ClassType();
SaveDBGridEhToExportFile(ExpClass,ADBGridEh,IFileName,true);
在BCB6下编绎正常,转到XE6下编译出现以下错误信息
E2034 Cannot convert 'TMetaClass *' to 'TMetaClass'
类型转换问题这要怎么处理,高手门帮忙下
6 个解决方案
#1
TDBGridEhExportClass ExpClass;
ExpClass = __classid(TDBGridEhExportAsXLS);
Dbgridehimpexp::SaveDBGridEhToExportFile(ExpClass, dbgrid1, FileName, true);
好像也没差别
#2
TDBGridEhExportClass ExpClass;
ExpClass=__classid(TDBGridEhExportAsXLS);//TDBGridEhExportAsXLS().ClassType();
Dbgridehimpexp::SaveDBGridEhToExportFile(ExpClass,ADBGridEh,IFileName,true);
还是一样的提示错误
ExpClass=__classid(TDBGridEhExportAsXLS);//TDBGridEhExportAsXLS().ClassType();
Dbgridehimpexp::SaveDBGridEhToExportFile(ExpClass,ADBGridEh,IFileName,true);
还是一样的提示错误
#3
*ExpClass
#4
还是不行额
#5
SaveDBGridEhToExportFile(*ExpClass,ADBGridEh,IFileName,true);
找到SaveDBGridEhToExportFile函数定义原形看看是什么类型
#6
extern DELPHI_PACKAGE void __fastcall SaveDBGridEhToExportFile(TDBGridEhExportClass ExportClass, Dbgrideh::TCustomDBGridEh* DBGridEh, const System::UnicodeString FileName, bool IsSaveAll);
#1
TDBGridEhExportClass ExpClass;
ExpClass = __classid(TDBGridEhExportAsXLS);
Dbgridehimpexp::SaveDBGridEhToExportFile(ExpClass, dbgrid1, FileName, true);
好像也没差别
#2
TDBGridEhExportClass ExpClass;
ExpClass=__classid(TDBGridEhExportAsXLS);//TDBGridEhExportAsXLS().ClassType();
Dbgridehimpexp::SaveDBGridEhToExportFile(ExpClass,ADBGridEh,IFileName,true);
还是一样的提示错误
ExpClass=__classid(TDBGridEhExportAsXLS);//TDBGridEhExportAsXLS().ClassType();
Dbgridehimpexp::SaveDBGridEhToExportFile(ExpClass,ADBGridEh,IFileName,true);
还是一样的提示错误
#3
*ExpClass
#4
还是不行额
#5
SaveDBGridEhToExportFile(*ExpClass,ADBGridEh,IFileName,true);
找到SaveDBGridEhToExportFile函数定义原形看看是什么类型
#6
extern DELPHI_PACKAGE void __fastcall SaveDBGridEhToExportFile(TDBGridEhExportClass ExportClass, Dbgrideh::TCustomDBGridEh* DBGridEh, const System::UnicodeString FileName, bool IsSaveAll);