From e6b40558425891191156ce1a464a38b03d316fff Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Wed, 23 Oct 2024 22:10:33 +0200 Subject: [PATCH] Correct wrong string method calls These two calls have no effect because `std::string::empty()` only tests for emptiness, but does not cause it as apparently intended. --- pgxalib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgxalib.cpp b/pgxalib.cpp index b476de84..da07e7c9 100755 --- a/pgxalib.cpp +++ b/pgxalib.cpp @@ -170,8 +170,8 @@ HDBC XAConnection::ActivateConnection(void) SQLFreeHandle(SQL_HANDLE_DBC, xaconn); return NULL; } - sqlState.empty(); - errMsg.empty(); + sqlState.clear(); + errMsg.clear(); ret = SQLDriverConnect(xaconn, NULL, (SQLCHAR *) (dsnstr + ";Username=postgres;Password=postgres;sslmode=allow").c_str(), SQL_NTS, NULL, SQL_NULL_DATA, NULL, SQL_DRIVER_COMPLETE); if (SQL_SUCCEEDED(ret))