From b594c027a8bd37245c4d38b3a0765dc4b13bbd09 Mon Sep 17 00:00:00 2001 From: Markus Klein Date: Fri, 12 Feb 2021 12:48:58 +0100 Subject: [PATCH] Fix constant INVALID_HANDLE --- Cargo.toml | 2 +- Changelog.md | 5 +++++ src/sqlreturn.rs | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1de4d06..e0fa058 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "odbc-sys" -version = "0.17.0" +version = "0.17.1" authors = ["Markus Klein "] license = "MIT" description = "ODBC ffi bindings" diff --git a/Changelog.md b/Changelog.md index 24a3fa9..3e71a9c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,11 @@ Changelog ========= +0.17.1 +------ + +* Fix: `SqlReturn::INVALID_HANDLE` is now correctly set to `-2`. + 0.17.0 ------ diff --git a/src/sqlreturn.rs b/src/sqlreturn.rs index f93b88c..e36f6f5 100644 --- a/src/sqlreturn.rs +++ b/src/sqlreturn.rs @@ -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 ///