예제 #1
0
 internal static extern int OCIErrorGet(IntPtr hndlp,
     uint recordno,
     IntPtr sqlstate,
     out int errcodep,
     IntPtr bufp,
     uint bufsize,
     [MarshalAs (UnmanagedType.U4)] OciHandleType type);
예제 #2
0
 internal static int OCIHandleFree(IntPtr hndlp,
     OciHandleType type)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, string.Format("OCIHandleFree ({0})", type), "OCI");
     #endif
     return OciNativeCalls.OCIHandleFree (hndlp, type);
 }
예제 #3
0
        internal static int OCIDescriptorFree(IntPtr hndlp,
                                              OciHandleType type)
        {
#if TRACE
            Trace.WriteLineIf(traceOci, string.Format("OCIDescriptorFree ({0})", type), OCI_DLL);
#endif

            return(OciNativeCalls.OCIDescriptorFree(hndlp, type));
        }
예제 #4
0
 internal static int OCIParamGet(IntPtr hndlp,
     OciHandleType htype,
     IntPtr errhp,
     out IntPtr parmdpp,
     int pos)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, "OCIParamGet", "OCI");
     #endif
     return OciNativeCalls.OCIParamGet (hndlp, htype, errhp, out parmdpp, pos);
 }
예제 #5
0
 internal static int OCIDescriptorAlloc(IntPtr parenth,
     out IntPtr hndlpp,
     OciHandleType type,
     int xtramem_sz,
     IntPtr usrmempp)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, "OCIDescriptorAlloc", "OCI");
     #endif
     return OciNativeCalls.OCIDescriptorAlloc (parenth, out hndlpp, type, xtramem_sz, usrmempp);
 }
예제 #6
0
 internal static int OCIHandleAlloc(IntPtr parenth,
     out IntPtr descpp,
     OciHandleType type,
     int xtramem_sz,
     IntPtr usrmempp)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, string.Format("OCIHandleAlloc ({0})", type), "OCI");
     #endif
     return OciNativeCalls.OCIHandleAlloc (parenth, out descpp, type, xtramem_sz, usrmempp);
 }
예제 #7
0
        internal static int OCIServerVersion(IntPtr hndlp,
                                             IntPtr errhp,
                                             ref byte[] bufp,
                                             uint bufsz,
                                             OciHandleType hndltype)
        {
#if TRACE
            Trace.WriteLineIf(traceOci, "OCIServerVersion", OCI_DLL);
#endif

            return(OciNativeCalls.OCIServerVersion(hndlp, errhp, bufp, bufsz, hndltype));
        }
예제 #8
0
 internal static int OCIAttrSetString(IntPtr trgthndlp,
     OciHandleType trghndltyp,
     string attributep,
     uint size,
     OciAttributeType attrtype,
     IntPtr errhp)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, string.Format("OCIAttrSetString ({0}, {1})", trghndltyp, attrtype), "OCI");
     #endif
     return OciNativeCalls.OCIAttrSetString (trgthndlp, trghndltyp, attributep, size, attrtype, errhp);
 }
예제 #9
0
 internal static int OCIAttrGetIntPtr(IntPtr trgthndlp,
     OciHandleType trghndltyp,
     out IntPtr attributep,
     IntPtr sizep,
     OciAttributeType attrtype,
     IntPtr errhp)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, "OCIAttrGetIntPtr", "OCI");
     #endif
     return OciNativeCalls.OCIAttrGetIntPtr (trgthndlp, trghndltyp, out attributep, sizep, attrtype, errhp);
 }
예제 #10
0
        internal static int OCIAttrGetRowIdDesc(IntPtr trgthndlp,
                                                [MarshalAs(UnmanagedType.U4)] OciHandleType trghndltyp,
                                                IntPtr attributep,
                                                ref uint sizep,
                                                [MarshalAs(UnmanagedType.U4)] OciAttributeType attrtype,
                                                IntPtr errhp)
        {
#if TRACE
            Trace.WriteLineIf(traceOci, "OCIAttrGetRowIdDesc", OCI_DLL);
#endif
            return(OciNativeCalls.OCIAttrGetRowIdDesc(trgthndlp, trghndltyp, attributep, ref sizep, attrtype, errhp));
        }
예제 #11
0
 internal static int OCIErrorGet(IntPtr hndlp,
     uint recordno,
     IntPtr sqlstate,
     out int errcodep,
     IntPtr bufp,
     uint bufsize,
     OciHandleType type)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, "OCIErrorGet", "OCI");
     #endif
     return OciNativeCalls.OCIErrorGet (hndlp, recordno, sqlstate, out errcodep, bufp, bufsize, type);
 }
예제 #12
0
        internal static int OCIAttrGetUInt16(IntPtr trgthndlp,
                                             OciHandleType trghndltyp,
                                             out ushort attributep,
                                             IntPtr sizep,
                                             OciAttributeType attrtype,
                                             IntPtr errhp)
        {
#if TRACE
            Trace.WriteLineIf(traceOci, "OCIAttrGetUInt16", OCI_DLL);
#endif

            return(OciNativeCalls.OCIAttrGetUInt16(trgthndlp, trghndltyp, out attributep, sizep, attrtype, errhp));
        }
예제 #13
0
파일: OciHandle.cs 프로젝트: nlhepler/mono
		internal OciHandle Allocate (OciHandleType type) {
			int status = 0;
			IntPtr newHandle = IntPtr.Zero;

			if (type < OciHandleType.LobLocator)
				status = OciCalls.OCIHandleAlloc (this,
					out newHandle,
					type,
					0,
					IntPtr.Zero);
			else
				status = OciCalls.OCIDescriptorAlloc (this,
					out newHandle,
					type,
					0,
					IntPtr.Zero);
		
			if (status != 0 && status != 1)
				throw new Exception (String.Format ("Could not allocate new OCI Handle of type {0}", type));

			switch (type) {
			case OciHandleType.Service:
				return new OciServiceHandle (this, newHandle);
			case OciHandleType.Error:
				return new OciErrorHandle (this, newHandle);
			case OciHandleType.Server:
				return new OciServerHandle (this, newHandle);
			case OciHandleType.Session:
				return new OciSessionHandle (this, newHandle);
			case OciHandleType.Statement:
				return new OciStatementHandle (this, newHandle);
			case OciHandleType.Transaction:
				return new OciTransactionHandle (this, newHandle);
			case OciHandleType.LobLocator:
				return new OciLobLocator (this, newHandle);
			case OciHandleType.RowId:
				return new OciRowIdDescriptor (this, newHandle);
			case OciHandleType.TimeStamp:
				return new OciDateTimeDescriptor (this, newHandle);
			case OciHandleType.IntervalDayToSecond:
			case OciHandleType.IntervalYearToMonth:
				return new OciIntervalDescriptor (this, type, newHandle);
			}
			return null;
		}
		public OciDescriptorHandle (OciHandleType type, OciHandle parent, IntPtr newHandle)
			: base (type, parent, newHandle)
		{
		}
예제 #15
0
		public OciIntervalDescriptor (OciHandle parent, OciHandleType type, IntPtr newHandle)
			: base (type, parent, newHandle)
		{
		}
예제 #16
0
		internal static int OCIAttrGetInt32 (IntPtr trgthndlp,
			OciHandleType trghndltyp,
			out int attributep,
			IntPtr sizep,
			OciAttributeType attrtype,
			IntPtr errhp)
		{
			Trace.WriteLineIf(traceOci, "OCIAttrGetInt32", "OCI");
			return OciNativeCalls.OCIAttrGetInt32 (trgthndlp, trghndltyp, out attributep, sizep, attrtype, errhp);
		}
예제 #17
0
 internal static extern int OCIHandleFree(IntPtr hndlp,
     [MarshalAs (UnmanagedType.U4)] OciHandleType type);
예제 #18
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIParamGet (IntPtr hndlp,
			OciHandleType htype,
			IntPtr errhp,
			out IntPtr parmdpp,
			int pos)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, "OCIParamGet", "OCI");
			#endif
			return OciNativeCalls.OCIParamGet (hndlp, htype, errhp, out parmdpp, pos);
		}
 public OciIntervalDescriptor(OciHandle parent, OciHandleType type, IntPtr newHandle)
     : base(type, parent, newHandle)
 {
 }
예제 #20
0
 internal static extern int OCIServerVersion(IntPtr hndlp,
     IntPtr errhp,
     [In][Out] byte[] bufp,
     uint bufsz,
     [MarshalAs (UnmanagedType.U4)] OciHandleType type);
예제 #21
0
 internal static extern int OCIParamGet(IntPtr hndlp,
     [MarshalAs (UnmanagedType.U4)] OciHandleType htype,
     IntPtr errhp,
     out IntPtr parmdpp,
     [MarshalAs (UnmanagedType.U4)] int pos);
예제 #22
0
		public OciHandle (OciHandleType type, OciHandle parent, IntPtr newHandle) {
			this.type = type;
			this.parent = parent;
			this.handle = newHandle;
		}
예제 #23
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIErrorGet (IntPtr hndlp,
			uint recordno,
			IntPtr sqlstate,
			out int errcodep,
			IntPtr bufp,
			uint bufsize,
			OciHandleType type)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, "OCIErrorGet", "OCI");
			#endif
			return OciNativeCalls.OCIErrorGet (hndlp, recordno, sqlstate, out errcodep, bufp, bufsize, type);
		}
예제 #24
0
 internal OciDescriptorHandle(OciHandleType type, OciHandle parent, IntPtr newHandle)
     : base(type, parent, newHandle)
 {
 }
예제 #25
0
 internal static extern int OCIHandleAlloc(IntPtr parenth,
     out IntPtr descpp,
     [MarshalAs (UnmanagedType.U4)] OciHandleType type,
     int xtramem_sz,
     IntPtr usrmempp);
예제 #26
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIServerVersion (IntPtr hndlp,
			IntPtr errhp,
			ref byte[] bufp,
			uint bufsz,
			OciHandleType hndltype)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, "OCIServerVersion", "OCI");
			#endif
			return OciNativeCalls.OCIServerVersion (hndlp,
				errhp,
				bufp,
				bufsz,
				hndltype);
		}
예제 #27
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIDescriptorAlloc (IntPtr parenth,
			out IntPtr hndlpp,
			OciHandleType type,
			int xtramem_sz,
			IntPtr usrmempp)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, "OCIDescriptorAlloc", "OCI");
			#endif
			return OciNativeCalls.OCIDescriptorAlloc (parenth, out hndlpp, type, xtramem_sz, usrmempp);
		}
예제 #28
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIAttrSetString (IntPtr trgthndlp,
			OciHandleType trghndltyp,
			string attributep,
			uint size,
			OciAttributeType attrtype,
			IntPtr errhp)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, string.Format("OCIAttrSetString ({0}, {1})", trghndltyp, attrtype), "OCI");
			#endif
			return OciNativeCalls.OCIAttrSetString (trgthndlp, trghndltyp, attributep, size, attrtype, errhp);
		}
예제 #29
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIHandleFree (IntPtr hndlp,
			OciHandleType type)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, string.Format("OCIHandleFree ({0})", type), "OCI");
			#endif
			return OciNativeCalls.OCIHandleFree (hndlp, type);
		}
예제 #30
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIAttrGetIntPtr (IntPtr trgthndlp,
			OciHandleType trghndltyp,
			out IntPtr attributep,
			IntPtr sizep,
			OciAttributeType attrtype,
			IntPtr errhp)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, "OCIAttrGetIntPtr", "OCI");
			#endif
			return OciNativeCalls.OCIAttrGetIntPtr (trgthndlp, trghndltyp, out attributep, sizep, attrtype, errhp);
		}
예제 #31
0
 internal OciHandle(OciHandleType type, OciHandle parent, IntPtr newHandle)
 {
     this.type   = type;
     this.parent = parent;
     this.handle = newHandle;
 }
예제 #32
0
파일: OciCalls.cs 프로젝트: carrie901/mono
		internal static int OCIHandleAlloc (IntPtr parenth,
			out IntPtr descpp,
			OciHandleType type,
			int xtramem_sz,
			IntPtr usrmempp)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, string.Format("OCIHandleAlloc ({0})", type), "OCI");
			#endif
			return OciNativeCalls.OCIHandleAlloc (parenth, out descpp, type, xtramem_sz, usrmempp);
		}
예제 #33
0
 internal static extern int OCIAttrGetUInt16(IntPtr trgthndlp,
     [MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
     out ushort attributep,
     IntPtr sizep,
     [MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
     IntPtr errhp);
예제 #34
0
 internal static extern int OCIAttrGetRowIdDesc(IntPtr trgthndlp,
                                                [MarshalAs(UnmanagedType.U4)] OciHandleType trghndltyp,
                                                IntPtr attributep,
                                                ref uint sizep,
                                                [MarshalAs(UnmanagedType.U4)] OciAttributeType attrtype,
                                                IntPtr errhp);
예제 #35
0
 internal static extern int OCIAttrSetString(IntPtr trgthndlp,
     [MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
     string attributep,
     uint size,
     [MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
     IntPtr errhp);
예제 #36
0
        internal OciHandle Allocate(OciHandleType type)
        {
            int    status    = 0;
            IntPtr newHandle = IntPtr.Zero;

            if (type < OciHandleType.LobLocator)
            {
                status = OciCalls.OCIHandleAlloc(this,
                                                 out newHandle,
                                                 type,
                                                 0,
                                                 IntPtr.Zero);
            }
            else
            {
                status = OciCalls.OCIDescriptorAlloc(this,
                                                     out newHandle,
                                                     type,
                                                     0,
                                                     IntPtr.Zero);
            }

            if (status != 0 && status != 1)
            {
                throw new Exception(String.Format("Could not allocate new OCI Handle of type {0}", type));
            }

            switch (type)
            {
            case OciHandleType.Service:
                return(new OciServiceHandle(this, newHandle));

            case OciHandleType.Error:
                return(new OciErrorHandle(this, newHandle));

            case OciHandleType.Server:
                return(new OciServerHandle(this, newHandle));

            case OciHandleType.Session:
                return(new OciSessionHandle(this, newHandle));

            case OciHandleType.Statement:
                return(new OciStatementHandle(this, newHandle));

            case OciHandleType.Transaction:
                return(new OciTransactionHandle(this, newHandle));

            case OciHandleType.LobLocator:
                return(new OciLobLocator(this, newHandle));

            case OciHandleType.RowId:
                return(new OciRowIdDescriptor(this, newHandle));

            case OciHandleType.TimeStamp:
                return(new OciDateTimeDescriptor(this, newHandle));

            case OciHandleType.IntervalDayToSecond:
            case OciHandleType.IntervalYearToMonth:
                return(new OciIntervalDescriptor(this, type, newHandle));
            }
            return(null);
        }
예제 #37
0
		internal static int OCIDescriptorFree (IntPtr hndlp,
			OciHandleType type)
		{
			Trace.WriteLineIf(traceOci, string.Format("OCIDescriptorFree ({0})", type), "OCI");
			return OciNativeCalls.OCIDescriptorFree (hndlp, type);
		}