Commit ddd62ba2 authored by Olivier Bertrand's avatar Olivier Bertrand

- Change SQL_NTS to 0 when the string is NULL

  modified:   storage/connect/odbconn.cpp
parent 3e20a0d8
...@@ -2249,7 +2249,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) ...@@ -2249,7 +2249,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
rc = SQLTables(hstmt, name.ptr(2), name.length(2), rc = SQLTables(hstmt, name.ptr(2), name.length(2),
name.ptr(1), name.length(1), name.ptr(1), name.length(1),
name.ptr(0), name.length(0), name.ptr(0), name.length(0),
cap->Pat, SQL_NTS); cap->Pat, cap->Pat ? SQL_NTS : 0);
break; break;
case CAT_COL: case CAT_COL:
// rc = SQLSetStmtAttr(hstmt, SQL_ATTR_METADATA_ID, // rc = SQLSetStmtAttr(hstmt, SQL_ATTR_METADATA_ID,
...@@ -2258,7 +2258,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) ...@@ -2258,7 +2258,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
rc = SQLColumns(hstmt, name.ptr(2), name.length(2), rc = SQLColumns(hstmt, name.ptr(2), name.length(2),
name.ptr(1), name.length(1), name.ptr(1), name.length(1),
name.ptr(0), name.length(0), name.ptr(0), name.length(0),
cap->Pat, SQL_NTS); cap->Pat, cap->Pat ? SQL_NTS : 0);
break; break;
case CAT_KEY: case CAT_KEY:
fnc = "SQLPrimaryKeys"; fnc = "SQLPrimaryKeys";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment