LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble with variant type for ActiveX Automation variable

I have created an ActiveX Automation controller for the DAO 3.5 Object Library. My second function call is DAO_DBEngineCreateWorkspace(). The sixth param to it is called type and the help says that it can be a constant called dbUseODBC. I have looked in the include file that was created and the closest thing in there is an enum called DAOEnum_WorkspaceTypeEnum which contains DAOConst_dbUseODBC. How do I specify this constant ? I tried DAOEnum_WorkspaceTypeEnum.DAOConst_dbUseODBC but that wouldn't work. I get "undeclared identifier DAOEnum_WorkspaceTypeEnum".
0 Kudos
Message 1 of 3
(2,973 Views)
I solved this via 8 hours of trial an error.
0 Kudos
Message 2 of 3
(2,973 Views)
Hello

Seems like the function is expecting a variant and the enum is an int, so use the CA_VariantInt() to pass the integer as an variant.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 3 of 3
(2,973 Views)