コード例 #1
0
        public int Write(byte[] buffer, uint offset, uint count, OracleType type)
        {
            int  status = 0;
            uint amount = count;

            if (type == OracleType.Clob)
            {
                amount /= 2;
            }

            status = OciCalls.OCILobWrite(Service,
                                          ErrorHandle,
                                          this,
                                          ref amount,
                                          offset,
                                          buffer,
                                          count,
                                          0, // OCI_ONE_PIECE
                                          IntPtr.Zero,
                                          IntPtr.Zero,
                                          1000, // OCI_UCS2ID
                                          0);

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

            return((int)amount);
        }