Skip to content

Commit ddd62ba

Browse files
committed
- Change SQL_NTS to 0 when the string is NULL
modified: storage/connect/odbconn.cpp
1 parent 3e20a0d commit ddd62ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/connect/odbconn.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,7 +2249,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
22492249
rc = SQLTables(hstmt, name.ptr(2), name.length(2),
22502250
name.ptr(1), name.length(1),
22512251
name.ptr(0), name.length(0),
2252-
cap->Pat, SQL_NTS);
2252+
cap->Pat, cap->Pat ? SQL_NTS : 0);
22532253
break;
22542254
case CAT_COL:
22552255
// rc = SQLSetStmtAttr(hstmt, SQL_ATTR_METADATA_ID,
@@ -2258,7 +2258,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
22582258
rc = SQLColumns(hstmt, name.ptr(2), name.length(2),
22592259
name.ptr(1), name.length(1),
22602260
name.ptr(0), name.length(0),
2261-
cap->Pat, SQL_NTS);
2261+
cap->Pat, cap->Pat ? SQL_NTS : 0);
22622262
break;
22632263
case CAT_KEY:
22642264
fnc = "SQLPrimaryKeys";

0 commit comments

Comments
 (0)