• Advertisement
Sign in to follow this  

Populating Array Difficulty

This topic is 2660 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have built a program utilizing ADO to pull data from an Access Database. I am having problems taking this data which is formated as a _variant_t data type to a floating point array in C++. The following is the initial format of the array and the process that is attempting to populate this array. Can someone help me with a good source to learn about these conversions? Secondly, can someone help me with the proper code for the array so that it can be populated? At the bottom is the error message I am getting.

const int arraySize = 5000;
_variant_t OpenArr[arraySize];

ADODB::_RecordsetPtr recOpen = NULL;

Open = pOpenField->Value;
printf("Data_Open: %4.5f\n", Open.fltVal);
printf("Record: %d\n", record);
recOpen->MoveNext( );

Data_Open: 1.41283
Record: 1
Code = 800a0d5d
Code meaning = U
Source = ADODB.Recordset
Description = Application uses a value of the wrong type for the current operation.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement