]> granicus.if.org Git - postgresql/commitdiff
Fix a bug in SQLError().
authorHiroshi Inoue <inoue@tpf.co.jp>
Thu, 4 Apr 2002 23:29:16 +0000 (23:29 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Thu, 4 Apr 2002 23:29:16 +0000 (23:29 +0000)
src/interfaces/odbc/environ.c

index 4fdfe74c9d4a721ddabfa4c60ec0701c40610076..6de5c50c4e3da921d7de725179d07b2abdac2673 100644 (file)
@@ -317,7 +317,7 @@ PGAPI_ConnectError( HDBC hdbc,
        SWORD           msglen;
 
        mylog("**** PGAPI_ConnectError: hdbc=%u <%d>\n", hdbc, cbErrorMsgMax);
-       if (RecNumber != 1)
+       if (RecNumber != 1 && RecNumber != -1)
                return SQL_NO_DATA_FOUND;
        if (cbErrorMsgMax < 0)
                return SQL_ERROR;
@@ -443,7 +443,7 @@ PGAPI_EnvError(             HENV henv,
        int             status;
 
        mylog("**** PGAPI_EnvError: henv=%u <%d>\n", henv, cbErrorMsgMax);
-       if (RecNumber != 1)
+       if (RecNumber != 1 && RecNumber != -1)
                return SQL_NO_DATA_FOUND;
        if (cbErrorMsgMax < 0)
                return SQL_ERROR;