internal static extern ODBCResult SQLGetDiagRecW( ODBCHType handleType, ODBCHBase handle, short recordNumber, StringBuilder stateBuffer, out int nativeError, StringBuilder messageBuffer, short bufferLength, out short bufferLengthNeeded);
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); }
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); }
public ODBCHBase(ODBCHType hType) : base(IntPtr.Zero, true) { handle = IntPtr.Zero; HandleType = hType; }
internal static extern ODBCResult SQLFreeHandle( ODBCHType handleType, IntPtr handle);
internal static bool ReleaseHandle(ODBCHType handleType, IntPtr handle) { return(ODBCNativeMethods.SQLFreeHandle(handleType, handle) == ODBCResult.Success); }
internal static extern ODBCResult SQLAllocHandle( ODBCHType handleType, ODBCHConnection inputHandle, out IntPtr outputHandle);
internal static extern ODBCResult SQLAllocHandle( ODBCHType handleType, ODBCHEnvironment inputHandle, out IntPtr outputHandle);