Patch nanodbc for postgres support

This commit is contained in:
Jon Evans 2022-08-19 16:07:44 -04:00
parent 63a6237d2d
commit 20ba716c1f
1 changed files with 18 additions and 0 deletions

View File

@ -995,6 +995,15 @@ public:
if (!success(rc) && (event_handle == nullptr || rc != SQL_STILL_EXECUTING))
NANODBC_THROW_DATABASE_ERROR(dbc_, SQL_HANDLE_DBC);
int cursorType = SQL_CURSOR_KEYSET_DRIVEN;
NANODBC_CALL_RC(
SQLSetConnectAttr,
rc,
dbc_,
SQL_ATTR_CURSOR_TYPE,
(SQLPOINTER)(std::intptr_t)cursorType,
0);
connected_ = success(rc);
return rc;
@ -1045,6 +1054,15 @@ public:
if (!success(rc) && (event_handle == nullptr || rc != SQL_STILL_EXECUTING))
NANODBC_THROW_DATABASE_ERROR(dbc_, SQL_HANDLE_DBC);
int cursorType = SQL_CURSOR_KEYSET_DRIVEN;
NANODBC_CALL_RC(
SQLSetConnectAttr,
rc,
dbc_,
SQL_ATTR_CURSOR_TYPE,
(SQLPOINTER)(std::intptr_t)cursorType,
0);
connected_ = success(rc);
return rc;