Example #1
0
        public OciParameterDescriptor GetParameter(int position)
        {
            IntPtr handle = IntPtr.Zero;
            int    status = 0;

            status = OciCalls.OCIParamGet(this,
                                          OciHandleType.Statement,
                                          ErrorHandle,
                                          out handle,
                                          position + 1);

            if (status != 0)
            {
                OciErrorInfo info = ErrorHandle.HandleError();
                throw new OracleException(info.ErrorCode, info.ErrorMessage);
            }

            OciParameterDescriptor output = new OciParameterDescriptor(this, handle);

            output.ErrorHandle = ErrorHandle;
            if (parm == null)
            {
                parm = new ArrayList();
            }
            parm.Add(handle);
            return(output);
        }