Exemplo n.º 1
0
 internal static extern ODBCResult SQLGetDiagRecW(
     ODBCHType handleType,
     ODBCHBase handle,
     short recordNumber,
     StringBuilder stateBuffer,
     out int nativeError,
     StringBuilder messageBuffer,
     short bufferLength,
     out short bufferLengthNeeded);
Exemplo n.º 2
0
        internal static bool AllocateHandle(ODBCHType handleType, ODBCHEnvironment inputHandle, out IntPtr outputHandle)
        {
            IntPtr handle;
            var    result = ODBCNativeMethods.SQLAllocHandle(handleType, inputHandle, out handle);

            outputHandle = handle;
            if ((result != ODBCResult.Success) & (result != ODBCResult.SuccessWithInfo))
            {
                throw GetException(inputHandle, "Error allocating connection handle");
            }
            return(true);
        }
Exemplo n.º 3
0
        internal static bool AllocateHandle(ODBCHType handleType, IntPtr inputHandle, out IntPtr outputHandle)
        {
            IntPtr handle = IntPtr.Zero;
            var    result = ODBCNativeMethods.SQLAllocHandle(handleType, inputHandle, out handle);

            outputHandle = handle;

            if ((result != ODBCResult.Success) & (result != ODBCResult.SuccessWithInfo))
            {
                throw new ODBCAPIError("Can't allocate environment handle ");
            }

            return(true);
        }
Exemplo n.º 4
0
 public ODBCHBase(ODBCHType hType)
     : base(IntPtr.Zero, true)
 {
     handle     = IntPtr.Zero;
     HandleType = hType;
 }
Exemplo n.º 5
0
 internal static extern ODBCResult SQLFreeHandle(
     ODBCHType handleType,
     IntPtr handle);
Exemplo n.º 6
0
 internal static bool ReleaseHandle(ODBCHType handleType, IntPtr handle)
 {
     return(ODBCNativeMethods.SQLFreeHandle(handleType, handle) == ODBCResult.Success);
 }
Exemplo n.º 7
0
 internal static extern ODBCResult SQLAllocHandle(
     ODBCHType handleType,
     ODBCHConnection inputHandle,
     out IntPtr outputHandle);
Exemplo n.º 8
0
 internal static extern ODBCResult SQLAllocHandle(
     ODBCHType handleType,
     ODBCHEnvironment inputHandle,
     out IntPtr outputHandle);