How to Debug/Extract Values from the Variant Arrays

im2kul

Member²
Hi All,

I have a variant array where I keep on filling the variables that needs to be set for the Query:

Code:
for (int i = 0; i < DataSet->FieldCount; i++)
        {
            Query->SetVariable(vPList->Strings[i], vArrayElm[i]);
        }
        Query->ExecuteArray(0, ArrayCount);
        ArrayCount = 0;
Now how do I extract what values are being set? When I try to get the value by reference &vArrayElm I get some Variant Object which I again I cannot find what value is being set. When I use Query->Debug=true, it gives me the query but the values are all unknown as it only says
"{Array}"
:XMY_COLA={ARRAY}

Any help is highly appreciated.

Thanks
 
I'm not sure I understand the question. You set these vArrayElm values, but you don't know what the values are?
 
Yes thats correct...at the time of setting the variable, I need to know what is the value of vArrayElm. Trust me it does sound easy, but it is not really at least for me. When you put the variable &vArrayElm in the Watch window, it shows up as an object and it has so many variables in it all having their own references. So how can I direct know what the value of vArrayElm is?
 
Hi im2kul,

I expect you have worked around this already, but
just in case....

Create a new variable of the approrpiate type and
assign the value to it in the loop. Then assign
the variant array element from it. You will be able to see the
original value.

If you want to see what the array stores, you can
always copy the value back from the array into
another variable again to double-check the value
matches.
 
Back
Top