0 Replies Latest reply on Aug 25, 2002 11:37 AM by 321797

    problem with #import of tlb file in VC++

    321797
      Hi,
      I am facing problem when trying to code oo4o with VC++. I am using #import to import the .tlb file and trying to code around with that. Oracle Version 8.1.7

      When I try to add 2 parameters to the OraParameters class its throwing OLE error...(I checked with the release notes.. its seems they rectified it in version 2.2 itself, I am using OracleInProcServer 3.0 Type Lib)...

      I am able to establish connection with Oracle db..

      My code is as follows:
      --------------------------------
      OracleInProcServer::OraParameters *pParameters;

      pODatabase->Parameters->QueryInterface(&pParameters);

      hRes = pParameters->Add((unsigned short *)"A_NBR_USERID",(const struct tagVARIANT &) A_NBR_USERID, ORAPARM_INPUT, 2,NULL);

      /*******Its throwing error when I try to execute the below line*****************/
      hRes = pParameters->Add((unsigned short *)"A_NBR_TOPICID", (const struct tagVARIANT &) A_NBR_TOPICID, ORAPARM_INPUT, 2, NULL);

      hRes = pParameters->Add((unsigned short *)"result", (const struct tagVARIANT &) A_VAR_RESULT , ORAPARM_OUTPUT, ORATYPE_CURSOR, NULL);

      ---------------------------------

      If you had done this successfully, can you please share your code with me.

      mail me at: rajesh_narayanan@satyam.com

      Thanks 'n' Rgds,
      Raj