retriving hindi unicode data from database access in cstring variable in vc++,mfc
-
I have fetched unicode data from microsoft database access in cstring variale as below _variant_t dataHnd; CString data2; dataHnd=pRecordset_Objectiv->GetCollect("Meaning"); data2=dataHnd.bstrVal; but in data2 variable ???? shows instead of hindi unicode data. plz anyone tell me how i can get hindi unicode data in string variable
-
I have fetched unicode data from microsoft database access in cstring variale as below _variant_t dataHnd; CString data2; dataHnd=pRecordset_Objectiv->GetCollect("Meaning"); data2=dataHnd.bstrVal; but in data2 variable ???? shows instead of hindi unicode data. plz anyone tell me how i can get hindi unicode data in string variable
You can use the code like this also...
TCHAR szMsg[256]; _tcscpy(szMsg,OLE2T(dataHnd.bstrVal));
I hope this might help you... -
I have fetched unicode data from microsoft database access in cstring variale as below _variant_t dataHnd; CString data2; dataHnd=pRecordset_Objectiv->GetCollect("Meaning"); data2=dataHnd.bstrVal; but in data2 variable ???? shows instead of hindi unicode data. plz anyone tell me how i can get hindi unicode data in string variable
Do you have _UNICODE and UNICODE defined in your project configuration? These will force CString to wide character.
Best wishes, Hans