Esempio n. 1
0
        internal static int OraMTSOCIErrGet(ref int dwErr, NativeBuffer lpcEMsg, ref int lpdLen)
        {
            if (Bid.AdvancedOn)
            {
                Bid.Trace("<oc.OraMTSOCIErrGet|ADV|OCI> dwErr=%08X, lpcEMsg=0x%-07Ix lpdLen=%d\n", dwErr, NativeBuffer.HandleValueToTrace(lpcEMsg), lpdLen);
            }
            int num = System.Data.Common.UnsafeNativeMethods.OraMTSOCIErrGet(ref dwErr, lpcEMsg, ref lpdLen);

            if (Bid.AdvancedOn)
            {
                if (num == 0)
                {
                    Bid.Trace("<oc.OraMTSOCIErrGet|ADV|OCI|RET> rc=%d\n", num);
                    return(num);
                }
                string str = lpcEMsg.PtrToStringAnsi(0, lpdLen);
                Bid.Trace("<oc.OraMTSOCIErrGet|ADV|OCI|RET> rd=%d message='%ls', lpdLen=%d\n", num, str, lpdLen);
            }
            return(num);
        }
Esempio n. 2
0
        internal static int OCIRowidToChar(OciHandle rowidDesc, NativeBuffer outbfp, ref int bufferLength, OciHandle errhp)
        {
            ushort outbflp = (ushort)bufferLength;

            if (Bid.AdvancedOn)
            {
                Bid.Trace("<oc.OCIRowidToChar|ADV|OCI>          rowidDesc=0x%-07Ix outbfp=0x%-07Ix outbflp=%d, errhp=0x%-07Ix\n", OciHandle.HandleValueToTrace(rowidDesc), NativeBuffer.HandleValueToTrace(outbfp), outbfp.Length, OciHandle.HandleValueToTrace(errhp));
            }
            int num = System.Data.Common.UnsafeNativeMethods.OCIRowidToChar(rowidDesc, outbfp, ref outbflp, errhp);

            bufferLength = outbflp;
            if (Bid.AdvancedOn)
            {
                Bid.Trace("<oc.OCIRowidToChar|ADV|OCI|RET>      outbfp='%ls' rc=%d\n", outbfp.PtrToStringAnsi(0, outbflp), num);
            }
            return(num);
        }
Esempio n. 3
0
        internal static int OCIServerVersion(OciHandle hndlp, OciHandle errhp, NativeBuffer bufp)
        {
            if (Bid.AdvancedOn)
            {
                Bid.Trace("<oc.OCIServerVersion|ADV|OCI>        hndlp=0x%-07Ix errhp=0x%-07Ix bufp=0x%-07Ix bufsz=%d hndltype=%d{OCI.HTYPE}\n", OciHandle.HandleValueToTrace(hndlp), OciHandle.HandleValueToTrace(errhp), NativeBuffer.HandleValueToTrace(bufp), bufp.Length, (int)hndlp.HandleType);
            }
            int num = System.Data.Common.UnsafeNativeMethods.OCIServerVersion(hndlp, errhp, bufp, (uint)bufp.Length, (byte)hndlp.HandleType);

            if (Bid.AdvancedOn)
            {
                Bid.Trace("<oc.OCIServerVersion|ADV|OCI|RET>    rc=%d\n%ls\n\n", num, hndlp.PtrToString(bufp));
            }
            return(num);
        }
Esempio n. 4
0
        internal static int OCIErrorGet(OciHandle hndlp, int recordno, out int errcodep, NativeBuffer bufp)
        {
            if (Bid.AdvancedOn)
            {
                Bid.Trace("<oc.OCIErrorGet|ADV|OCI>             hndlp=0x%-07Ix recordno=%d sqlstate=0x%-07Ix bufp=0x%-07Ix bufsiz=%d type=%d{OCI.HTYPE}\n", OciHandle.HandleValueToTrace(hndlp), recordno, IntPtr.Zero, NativeBuffer.HandleValueToTrace(bufp), bufp.Length, (int)hndlp.HandleType);
            }
            int num = System.Data.Common.UnsafeNativeMethods.OCIErrorGet(hndlp, (uint)recordno, IntPtr.Zero, out errcodep, bufp, (uint)bufp.Length, hndlp.HandleType);

            if (Bid.AdvancedOn)
            {
                Bid.Trace("<oc.OCIErrorGet|ADV|OCI|RET>         errcodep=%d rc=%d\n\t%ls\n\n", errcodep, num, hndlp.PtrToString(bufp));
            }
            return(num);
        }