diff options
Diffstat (limited to 'libodbcpp/odbc-connection.cpp')
-rw-r--r-- | libodbcpp/odbc-connection.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libodbcpp/odbc-connection.cpp b/libodbcpp/odbc-connection.cpp index 4e4a0a1..8ecaf2c 100644 --- a/libodbcpp/odbc-connection.cpp +++ b/libodbcpp/odbc-connection.cpp @@ -55,14 +55,14 @@ ODBC::Connection::connectPost() if (!SQL_SUCCEEDED(dberr)) { throw ConnectionError(dberr, SQL_HANDLE_DBC, conn); } - char info[1024]; - dberr = SQLGetInfo(conn, SQL_DRIVER_NAME, (SQLCHAR*)info, sizeof(info), nullptr); + std::array<SQLCHAR, 1024> info {}; + dberr = SQLGetInfo(conn, SQL_DRIVER_NAME, info.data(), info.size(), nullptr); if (!SQL_SUCCEEDED(dberr)) { throw ConnectionError(dberr, SQL_HANDLE_DBC, conn); } // Apply known DB specific tweaks // NOLINTNEXTLINE(hicpp-no-array-decay) - if (strstr(info, "myodbc")) { + if (strcasestr((const char *)info.data(), "myodbc")) { thinkDelStyle = DB::BulkDeleteUsingUsingAlias; thinkUpdStyle = DB::BulkUpdateUsingJoin; } |