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. Oracle describe

Oracle describe

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++databaseoraclequestion
2 Posts 2 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.
  • R Offline
    R Offline
    rdop
    wrote on last edited by
    #1

    Hi All I have a problem to use command "describe tablename" in mfc vc++."Describe tablename" is working well in oracle SQl plus. Here is code

    _ConnectionPtr m_pConn;
    _RecordsetPtr pRecordset;

    m_pConn->Open (_bstr_t ("Provider=OraOLEDB.Oracle;PLSQLRSet=1;Data Source=orcl"),_bstr_t ("system"), _bstr_t ("password"), adModeUnknown);
    pCommand->ActiveConnection = m_pConn;
    CString fileddetail="describe supplier";
    pRecordset=m_pConn->Execute(_bstr_t(fileddetail), 0, adCmdText);

    Error is here

    OraOLEDB Error: -2147217900 ORA-00900: invalid SQL statement IDispatch error #3092

    Connection part is working well. I know some member told me this is a DBA forum question why you post here.But one thing describe or DESC command is working well in oracle.So i think it's a question of MFC VC++. Please help me

    X 1 Reply Last reply
    0
    • R rdop

      Hi All I have a problem to use command "describe tablename" in mfc vc++."Describe tablename" is working well in oracle SQl plus. Here is code

      _ConnectionPtr m_pConn;
      _RecordsetPtr pRecordset;

      m_pConn->Open (_bstr_t ("Provider=OraOLEDB.Oracle;PLSQLRSet=1;Data Source=orcl"),_bstr_t ("system"), _bstr_t ("password"), adModeUnknown);
      pCommand->ActiveConnection = m_pConn;
      CString fileddetail="describe supplier";
      pRecordset=m_pConn->Execute(_bstr_t(fileddetail), 0, adCmdText);

      Error is here

      OraOLEDB Error: -2147217900 ORA-00900: invalid SQL statement IDispatch error #3092

      Connection part is working well. I know some member told me this is a DBA forum question why you post here.But one thing describe or DESC command is working well in oracle.So i think it's a question of MFC VC++. Please help me

      X Offline
      X Offline
      xushih
      wrote on last edited by
      #2

      The Error messages means there is not this accout in the security database.Please check out the database accout name is right or wrong,espicaly look at using space in string or not.

      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