public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { OciHandle ociHandle = Handle; int byteCount = ociHandle.GetBytes(chars, charIndex, charCount, bytes, byteIndex); return(byteCount); }
internal static int OCILobFileSetName(OciHandle envhp, OciHandle errhp, OciFileDescriptor filep, string dir_alias, string filename) { if (Bid.AdvancedOn) { Bid.Trace("<oc.OCILobFileSetName|ADV|OCI> envhp=0x%-07Ix errhp=0x%-07Ix filep=0x%-07Ix dir_alias='%ls', d_length=%d, filename='%ls', f_length=%d\n", OciHandle.HandleValueToTrace(envhp), OciHandle.HandleValueToTrace(errhp), OciHandle.HandleValueToTrace(filep), dir_alias, dir_alias.Length, filename, filename.Length); } byte[] bytes = envhp.GetBytes(dir_alias); ushort length = (ushort)bytes.Length; byte[] fileName = envhp.GetBytes(filename); ushort fileNameLength = (ushort)fileName.Length; int num = filep.OCILobFileSetNameWrapper(envhp, errhp, bytes, length, fileName, fileNameLength); if (Bid.AdvancedOn) { Bid.Trace("<oc.OCILobFileSetName|ADV|OCI|RET> rc=%d\n", num); } return(num); }
internal static int OCIServerAttach(OciHandle srvhp, OciHandle errhp, string dblink, int dblink_len, OCI.MODE mode) { if (Bid.AdvancedOn) { Bid.Trace("<oc.OCIServerAttach|ADV|OCI> srvhp=0x%-07Ix errhp=0x%-07Ix dblink='%ls' dblink_len=%d mode=0x%x{OCI.MODE}\n", srvhp, errhp, dblink, dblink_len, (int)mode); } byte[] bytes = srvhp.GetBytes(dblink); int length = bytes.Length; int num = System.Data.Common.UnsafeNativeMethods.OCIServerAttach(srvhp, errhp, bytes, length, mode); if (Bid.AdvancedOn) { Bid.Trace("<oc.OCIServerAttach|ADV|OCI|RET> rc=%d\n", num); } return(num); }
internal static int OCIBindByName(OciHandle stmtp, out IntPtr bindpp, OciHandle errhp, string placeholder, int placeh_len, IntPtr valuep, int value_sz, OCI.DATATYPE dty, IntPtr indp, IntPtr alenp, OCI.MODE mode) { if (Bid.AdvancedOn) { Bid.Trace("<oc.OCIBindByName|ADV|OCI> stmtp=0x%-07Ix errhp=0x%-07Ix placeholder=%-20ls placeh_len=%-2d valuep=0x%-07Ix value_sz=%-4d dty=%d{OCI.DATATYPE} indp=0x%-07Ix *indp=%-3d alenp=0x%-07Ix *alenp=%-4d rcodep=0x%-07Ix maxarr_len=%-4d curelap=0x%-07Ix mode=0x%x{OCI.MODE}\n", OciHandle.HandleValueToTrace(stmtp), OciHandle.HandleValueToTrace(errhp), placeholder, placeh_len, valuep, value_sz, (int)dty, indp, (IntPtr.Zero == indp) ? 0 : Marshal.ReadInt16(indp), alenp, (IntPtr.Zero == alenp) ? 0 : Marshal.ReadInt16(alenp), IntPtr.Zero, 0, IntPtr.Zero, (int)mode); } byte[] bytes = stmtp.GetBytes(placeholder); int length = bytes.Length; int num = System.Data.Common.UnsafeNativeMethods.OCIBindByName(stmtp, out bindpp, errhp, bytes, length, valuep, value_sz, dty, indp, alenp, IntPtr.Zero, 0, IntPtr.Zero, mode); if (Bid.AdvancedOn) { Bid.Trace("<oc.OCIBindByName|ADV|OCI|RET> bindpp=0x%-07Ix rc=%d\n", bindpp, num); } return(num); }