Skip to content

Commit

Permalink
Fix constant INVALID_HANDLE
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Feb 12, 2021
1 parent 2c0c0cc commit b594c02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "odbc-sys"
version = "0.17.0"
version = "0.17.1"
authors = ["Markus Klein <markus-klein@live.de>"]
license = "MIT"
description = "ODBC ffi bindings"
Expand Down
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

0.17.1
------

* Fix: `SqlReturn::INVALID_HANDLE` is now correctly set to `-2`.

0.17.0
------

Expand Down
5 changes: 3 additions & 2 deletions src/sqlreturn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
pub struct SqlReturn(pub i16);

impl SqlReturn {
/// Function failed due to an invalid environment, connection, statement, or descriptor handle
/// `SQL_INVALID_HANDLE`; Function failed due to an invalid environment, connection, statement,
/// or descriptor handle.
///
/// This indicates a programming error. No additional information is available from
/// `SQLGetDiagRec` or `SQLGetDiagField`. This code is returned only when the handle is a null
/// pointer or is the wrong type, such as when a statement handle is passed for an argument a
/// connection handle.
pub const INVALID_HANDLE: SqlReturn = SqlReturn(-1);
pub const INVALID_HANDLE: SqlReturn = SqlReturn(-2);

/// Function failed
///
Expand Down

0 comments on commit b594c02

Please sign in to comment.