1 Reply Latest reply on Apr 23, 2004 3:18 PM by 82532

    What's the meaning of this HRESULT code?

    408135
      Hi all....

      Programming language: Visual C++ 6.0

      Well... I have a problem making this call,

      OraParametersPtr piParameters = m_piDatabase->Parameters;
      piParameters->Add(lpszName, *pvarValue, nDirection, nType, _T(""));

      When calling Add method, an exception is thrown using a comerror instance. The
      m_hresult member is 0x800403b8. I tried to search for an explanation of that
      code but without success.

      The actual call is,

      piParameters->Add(OLE2T(sName), &varValue, nDirection, nType);

      where sName is the name of parameter (as BSTR), varValue is the value (as
      VARIANT), nDirection is 0 (paramMode value) and nType is 0 too (serverType
      Value)

      The IDL for the Add method is (present in OIP9.TLB):

      HRESULT _stdcall Add(
      [in] BSTR Name,
      [in] VARIANT initval,
      [in] int IOtype,
      [in, optional] short varType,
      [in, optional] BSTR objectname);

      As you see, varType and objectname parameters are optional, notwithstanding, if
      I don't use them when calling Add method, compiler sends an error. Since those
      parameters aren't VARIANT, I cannot call the method using &vtMissing, so I pass
      varType explicitly as a determined value, and objectname as _T("").

      So, the questions are:
      - Can you know what means 0x800403b8 error?
      - If the error is produced by the calling of parameters, how can I call that
      method without passing the optional parameters?

      This object (OraParametersPtr) is part of the Oracle Objects for OLE, and the
      error isn't an Oracle error, since an exception occur. If it were an Oracle
      error, an HRESULT code will be returned by the Add method.


      Any help will be greatly appreciated.

      Thanks
      Jaime