You cannot copy a CString to a string pointer. From the rror message you got, I assume that strData is of type CString. If for whatever reason you need a pointer to a nul-terminated string you can ask the CString object to give you such a pointer by simply writing
const char* pchData = strData;
Not however that this pointer is only good as long the CString object lives.