Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. retriving hindi unicode data from database access in cstring variable in vc++,mfc

retriving hindi unicode data from database access in cstring variable in vc++,mfc

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasequestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prerananit
    wrote on last edited by
    #1

    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

    D H 2 Replies Last reply
    0
    • P prerananit

      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

      D Offline
      D Offline
      Debojyoti Majumder
      wrote on last edited by
      #2

      You can use the code like this also... TCHAR szMsg[256]; _tcscpy(szMsg,OLE2T(dataHnd.bstrVal)); I hope this might help you...

      1 Reply Last reply
      0
      • P prerananit

        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

        H Offline
        H Offline
        Hans Dietrich
        wrote on last edited by
        #3

        Do you have _UNICODE and UNICODE defined in your project configuration? These will force CString to wide character.

        Best wishes, Hans


        [Hans Dietrich Software]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups