internal void GetAttribute(OCI.ATTR attribute, out int value, OciErrorHandle errorHandle)
        {
            uint sizep = 0;
            int  rc    = TracedNativeMethods.OCIAttrGet(this, out value, out sizep, attribute, errorHandle);

            if (rc != 0)
            {
                OracleException.Check(errorHandle, rc);
            }
        }
        internal void GetAttribute(OCI.ATTR attribute, out string value, OciErrorHandle errorHandle, OracleConnection connection)
        {
            IntPtr zero  = IntPtr.Zero;
            uint   sizep = 0;
            int    rc    = TracedNativeMethods.OCIAttrGet(this, ref zero, ref sizep, attribute, errorHandle);

            if (rc != 0)
            {
                OracleException.Check(errorHandle, rc);
            }
            byte[] destination = new byte[sizep];
            Marshal.Copy(zero, destination, 0, (int)sizep);
            value = connection.GetString(destination);
        }
Exemplo n.º 3
0
        internal void GetRowid(OciStatementHandle statementHandle, OciErrorHandle errorHandle)
        {
            uint sizep = 0;
            int  rc    = TracedNativeMethods.OCIAttrGet(statementHandle, this, out sizep, OCI.ATTR.OCI_ATTR_ROWID, errorHandle);

            if (100 == rc)
            {
                base.Dispose();
            }
            else if (rc != 0)
            {
                OracleException.Check(errorHandle, rc);
            }
        }
Exemplo n.º 4
0
        internal void GetAttribute(
            OCI.ATTR attribute,
            out int value,
            OciHandle errorHandle
            )
        {
            int zero = 0;
            int rc   = TracedNativeMethods.OCIAttrGet(this, out value, out zero, attribute, errorHandle);

            if (0 != rc)
            {
                OracleException.Check(errorHandle, rc);
            }

            GC.KeepAlive(this);
        }
Exemplo n.º 5
0
        internal void GetAttribute(
            OCI.ATTR attribute,
            out string value,
            OciHandle errorHandle,
            OracleConnection connection
            )
        {
            IntPtr tempptr;
            int    tempub4;
            int    rc = TracedNativeMethods.OCIAttrGet(this, out tempptr, out tempub4, attribute, errorHandle);

            if (0 != rc)
            {
                OracleException.Check(errorHandle, rc);
            }

            value = connection.GetString(tempptr, tempub4, false);

            GC.KeepAlive(this);
        }
Exemplo n.º 6
0
        internal OciHandle GetRowid(
            OciHandle environmentHandle,
            OciHandle errorHandle
            )
        {
            OciHandle rowidHandle = new OciRowidDescriptor(environmentHandle);

            int zero = 0;
            int rc   = TracedNativeMethods.OCIAttrGet(this, rowidHandle, out zero, OCI.ATTR.OCI_ATTR_ROWID, errorHandle);

            if ((int)OCI.RETURNCODE.OCI_NO_DATA == rc)
            {
                SafeDispose(ref rowidHandle);
            }
            else if (0 != rc)
            {
                OracleException.Check(errorHandle, rc);
            }

            GC.KeepAlive(this);
            return(rowidHandle);
        }