From 8463c59712234c2b96de0476216c9ba4d342f8d9 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Fri, 11 Jul 2003 10:47:17 +0000 Subject: [PATCH] Improve SQLGetDiagField so that an MFC appliaction reports error messages properly(bug report from Silvio Scarpati). --- environ.c | 2 +- pgapi30.c | 12 ++++++++++++ version.h | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/environ.c b/environ.c index 8121cfd..dd3c388 100644 --- a/environ.c +++ b/environ.c @@ -541,7 +541,7 @@ PGAPI_Error( else if (SQL_NULL_HDBC != hdbc) ret = PGAPI_ConnectError(hdbc, -1, szSqlState, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg, flag); - else if (SQL_NULL_HENV != hdbc) + else if (SQL_NULL_HENV != henv) ret = PGAPI_EnvError(henv, -1, szSqlState, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg, flag); else diff --git a/pgapi30.c b/pgapi30.c index 9945998..41718c5 100644 --- a/pgapi30.c +++ b/pgapi30.c @@ -295,6 +295,18 @@ PGAPI_GetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, *StringLengthPtr = sizeof(SQLINTEGER); ret = SQL_SUCCESS; break; + case SQL_DIAG_ROW_NUMBER: + *((SQLINTEGER *) DiagInfoPtr) = SQL_ROW_NUMBER_UNKNOWN; + if (StringLengthPtr) + *StringLengthPtr = sizeof(SQLINTEGER); + ret = SQL_SUCCESS; + break; + case SQL_DIAG_COLUMN_NUMBER: + *((SQLINTEGER *) DiagInfoPtr) = SQL_COLUMN_NUMBER_UNKNOWN; + if (StringLengthPtr) + *StringLengthPtr = sizeof(SQLINTEGER); + ret = SQL_SUCCESS; + break; case SQL_DIAG_RETURNCODE: /* driver manager returns */ break; } diff --git a/version.h b/version.h index a176c42..c6074fc 100644 --- a/version.h +++ b/version.h @@ -9,8 +9,8 @@ #ifndef __VERSION_H__ #define __VERSION_H__ -#define POSTGRESDRIVERVERSION "07.03.0109" -#define POSTGRES_RESOURCE_VERSION "07.03.0109\0" -#define PG_DRVFILE_VERSION 7,3,1,09 +#define POSTGRESDRIVERVERSION "07.03.0110" +#define POSTGRES_RESOURCE_VERSION "07.03.0110\0" +#define PG_DRVFILE_VERSION 7,3,1,10 #endif -- 2.39.5