LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

The DLL version does not match the import library for SQL Function CA_VariantConvertToType

I upgraded from Lab Windows/CVI v6.0 to v8.0. I used an example from the Lab Windows/CVI SQL Toolkit Reference Manual that contained the function “CA_VariantConvertToType" which did not display a NON-FATAL RUN TIME ERROR when the debug executable ran under v6.0. LabWindows/CVI v8.0 now shows the following message;

NON-FATAL RUN-TIME ERROR:   "main.c", line 2424, col 5, thread id 0x00000D18:   Function CA_VariantConvertToType: (return value == -2147220983 [0x80040209]). The DLL version does not match the import library
 
 
0 Kudos
Message 1 of 2
(3,230 Views)

Additional information gained.

By right-clicking on the function “CA_VariantConvertToType” and selecting "Go to definition" I discovered that this function's header file is "cviauto.h" and the file is located in "C:\Program Files\National Instruments\CVI80\include".

From there I located the library file "cviauto.lib" in "C:\Program Files\National Instruments\CVI80\extlib".

I then located the DLL file (cviauto.dll) in "C:\WINDOWS\system32".

All these files have the same creation date and time.

I found that CVI 8.0 "OPTIONS/ENVIRONMENT/Include Paths..." has the header path for the "cviauto.h" file.

 

Why does CVI 8.0 generate the error?

 

And,

My program runs an Oracle stored procedure with 5 parameters consisting of INPUTS 1-3 and OUTPUTS 4&5 . Running my program results in all inputs correctly entered into the database. OUTPUTS are the concern.

I do get results stored in the VARIANTS "&value4" and "&value5" below;

    /* Examine the parameter values */  

DBGetParamAttribute (hstmt, 4, ATTR_DB_PARAM_VALUE, &value4);  

DBGetParamAttribute (hstmt, 5, ATTR_DB_PARAM_VALUE, &value5);

value4 results in the following;

NAME             VALUE                 TYPE

value4         VT_BSTR; "0"         VARIANT

value4.n1   0x00461668        union {struct_tagVARIANT n2;DECIMAL decVal;}

How do I get this information into a C-code string array variable?

0 Kudos
Message 2 of 2
(3,182 Views)