Board index » cppbuilder » Help understanding Variant vs. TVariant
Hardee & Jua
![]() CBuilder Developer |
Sun, 31 Aug 2003 09:36:25 GMT
Help understanding Variant vs. TVariant
I am trying to use an ActiveX called MapX in a BCB5 SP1 program. I am
on Windows ME. I am using the techniques described in C++Builder 4 Unleashed. I have Variant param, ds; param = CreateOleObject("MapX.ODBCQueryInfo.3"); param.OlePropertySet( "SqlQuery", "select * from USA" ); line 38> ds = Map1->Datasets->Add( miDataSetODBC, param ); The compile fails with the messages: [C++ Error] MainForm.cpp(38): E2342 Type mismatch in parameter If I change line 38 to: I looked up the Add function in the cpp file generated when I imported Mapxlib_tlb::CMapXDatasetPtr __fastcall Add(short Type, TVariant so you see it does want a TVariant. But don't I need a Variant to be Any help will be appreciated. Thanks in advance. Hardee Mahoney |