internal OciRowIdDescriptor GetAttributeRowIdDescriptor(OciErrorHandle errorHandle, OciHandle env) { OciRowIdDescriptor descriptor = null; IntPtr outputPtr = IntPtr.Zero; int outSize = 16; int status = 0; OciAttributeType attrType = OciAttributeType.RowId; outputPtr = OciCalls.AllocateClear(outSize); uint siz = (uint)outSize; status = OCIAttrGetRowIdDesc(Handle, HandleType, outputPtr, ref siz, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError(); throw new OracleException(info.ErrorCode, info.ErrorMessage); } if (outputPtr != IntPtr.Zero && siz > 0) { descriptor = (OciRowIdDescriptor)env.Allocate(OciHandleType.RowId); descriptor.SetHandle(outputPtr); } return(descriptor); }
internal string GetAttributeString(OciAttributeType attrType, OciErrorHandle errorHandle) { string output = String.Empty; IntPtr outputPtr = IntPtr.Zero; int outSize; int status = 0; status = OciCalls.OCIAttrGet(Handle, HandleType, out outputPtr, out outSize, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError(); throw new OracleException(info.ErrorCode, info.ErrorMessage); } if (outputPtr != IntPtr.Zero && outSize > 0) { object str = Marshal.PtrToStringAnsi(outputPtr, outSize); if (str != null) { output = String.Copy((string)str); } } return(output); }
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); }
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); }
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)); }
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)); }
internal void SetAttributeString(string attribute, OciAttributeType attrType, OciErrorHandle errorHandle) { int status = 0; status = OciCalls.OCIAttrSetString(Handle, HandleType, attribute, (uint)attribute.Length, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError(); throw new OracleException(info.ErrorCode, info.ErrorMessage); } }
internal IntPtr GetAttributeIntPtr(OciAttributeType attrType, OciErrorHandle errorHandle) { int status = 0; IntPtr output = IntPtr.Zero; status = OciCalls.OCIAttrGetIntPtr(Handle, HandleType, out output, IntPtr.Zero, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError(); throw new OracleException(info.ErrorCode, info.ErrorMessage); } return(output); }
internal static extern int OCIAttrGetUInt16(IntPtr trgthndlp, [MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp, out ushort attributep, IntPtr sizep, [MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype, IntPtr errhp);
public bool GetAttributeBool (OciAttributeType attrType, OciErrorHandle errorHandle) { return (GetAttributeInt32 (attrType, errorHandle) != 0); }
internal bool GetAttributeBool(OciAttributeType attrType, OciErrorHandle errorHandle) { return(GetAttributeInt32(attrType, errorHandle) != 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);
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); }
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); }
public void SetAttributeString (string attribute, OciAttributeType attrType, OciErrorHandle errorHandle) { int status = 0; status = OciCalls.OCIAttrSetString (Handle, HandleType, attribute, (uint) attribute.Length, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError (); throw new OracleException (info.ErrorCode, info.ErrorMessage); } }
public string GetAttributeString (OciAttributeType attrType, OciErrorHandle errorHandle) { string output = String.Empty; IntPtr outputPtr = IntPtr.Zero; int outSize; int status = 0; status = OciCalls.OCIAttrGet (Handle, HandleType, out outputPtr, out outSize, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError (); throw new OracleException (info.ErrorCode, info.ErrorMessage); } if (outputPtr != IntPtr.Zero && outSize > 0) { object str = Marshal.PtrToStringAnsi (outputPtr, outSize); if (str != null) output = String.Copy ((string) str); } return output; }
internal static extern int OCIAttrSetString(IntPtr trgthndlp, [MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp, string attributep, uint size, [MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype, IntPtr errhp);
internal sbyte GetAttributeSByte (OciAttributeType attrType, OciErrorHandle errorHandle) { int status = 0; sbyte output; status = OciCalls.OCIAttrGetSByte (Handle, HandleType, out output, IntPtr.Zero, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError (); throw new OracleException (info.ErrorCode, info.ErrorMessage); } return output; }
internal int GetAttributeInt32 (OciAttributeType attrType, OciErrorHandle errorHandle) { int status = 0; int output; status = OciCalls.OCIAttrGetInt32 (Handle, HandleType, out output, IntPtr.Zero, attrType, errorHandle); if (status != 0) { OciErrorInfo info = OciErrorHandle.HandleError (errorHandle, status); throw new OracleException (info.ErrorCode, info.ErrorMessage); } return output; }
public IntPtr GetAttributeIntPtr (OciAttributeType attrType, OciErrorHandle errorHandle) { int status = 0; IntPtr output = IntPtr.Zero; status = OciCalls.OCIAttrGetIntPtr (Handle, HandleType, out output, IntPtr.Zero, attrType, errorHandle); if (status != 0) { OciErrorInfo info = errorHandle.HandleError (); throw new OracleException (info.ErrorCode, info.ErrorMessage); } return output; }
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); }