Data Model > Frequently asked questions > How can I determine the question data type when I use an ADO recordset to access case data?
 
How can I determine the question data type when I use an ADO recordset to access case data?
If you are using the to read the data source, you can determine the question data type from the ADO field type. For example, you could use the following C++ code to determine the question data type:
switch (m_pField->Type){
case ADODB::adVarChar:
*pVal = mtCategorical;
break;
case ADODB::adVarWChar:
*pVal = mtText;
break;
case ADODB::adInteger:
*pVal = mtLong;
break;
case ADODB::adDouble:
*pVal = mtDouble;
break;
case ADODB::adDate:
*pVal = mtDate;
break;
case ADODB::adBoolean:
*pVal = mtBoolean;
break;
case ADODB::adChapter:
*pVal = mtLevel;
break;
default:
*pVal = mtNone;
}
See also
Frequently asked questions