Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0e11aea

Browse files
author
Hiroshi Inoue
committed
Fix a bug in SQLError().
1 parent 010d1af commit 0e11aea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/odbc/environ.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ PGAPI_ConnectError( HDBC hdbc,
317317
SWORD msglen;
318318

319319
mylog("**** PGAPI_ConnectError: hdbc=%u <%d>\n", hdbc, cbErrorMsgMax);
320-
if (RecNumber != 1)
320+
if (RecNumber != 1 && RecNumber != -1)
321321
return SQL_NO_DATA_FOUND;
322322
if (cbErrorMsgMax < 0)
323323
return SQL_ERROR;
@@ -443,7 +443,7 @@ PGAPI_EnvError( HENV henv,
443443
int status;
444444

445445
mylog("**** PGAPI_EnvError: henv=%u <%d>\n", henv, cbErrorMsgMax);
446-
if (RecNumber != 1)
446+
if (RecNumber != 1 && RecNumber != -1)
447447
return SQL_NO_DATA_FOUND;
448448
if (cbErrorMsgMax < 0)
449449
return SQL_ERROR;

0 commit comments

Comments
 (0)