SC_get_errormsg() definition is repeated twice in succession.
In info.c:SQLGetInfo(), "len = 0" is unnecessary because len is assigned at the end of the function.
In execute.c:PGAPI_ExecDirect(), flag doesn't need to be set as its value doesn't change.
PODBC_PER_STATEMENT_ROLLBACK is not used.
[patch by Tsunakawa, Takayuki]
sprintf(tmp, "%d", comval->unique_index);
if (!SQLWritePrivateProfileString(sectionName, INI_UNIQUEINDEX, tmp, fileName))
errc--;
- /*
- * Never update the onlyread from this module.
- */
- if (stricmp(ODBCINST_INI, fileName) == 0)
- {
- sprintf(tmp, "%d", comval->onlyread);
- SQLWritePrivateProfileString(sectionName, INI_READONLY, tmp,
- fileName);
- }
sprintf(tmp, "%d", comval->use_declarefetch);
if (!SQLWritePrivateProfileString(sectionName, INI_USEDECLAREFETCH, tmp, fileName))
mylog("%s: calling PGAPI_Execute...\n", func);
- flag = SC_is_with_hold(stmt) ? PODBC_WITH_HOLD : 0;
result = PGAPI_Execute(hstmt, flag);
mylog("%s: returned %hd from PGAPI_Execute\n", func, result);
value = SQL_BS_SELECT_EXPLICIT | SQL_BS_ROW_COUNT_EXPLICIT;
break;
case SQL_CATALOG_NAME:
- len = 0;
if (CurrCat(conn))
p = "Y";
else
p = "N";
break;
case SQL_COLLATION_SEQ:
- len = 0;
p = "";
break;
case SQL_CREATE_ASSERTION:
value = SQL_DI_CREATE_INDEX | SQL_DI_DROP_INDEX;
break;
case SQL_DESCRIBE_PARAMETER:
- len = 0;
p = "N";
break;
case SQL_DROP_ASSERTION:
value = NAMEDATALEN_V73 - 1;
break;
case SQL_MAX_ROW_SIZE_INCLUDES_LONG:
- len = 0;
p = "Y";
break;
case SQL_PARAM_ARRAY_ROW_COUNTS:
#define PODBC_INHERIT_CONNECT_OPTIONS (1L << 1)
/* Internal flags for PGAPI_Exec... functions */
#define PODBC_WITH_HOLD 1L
-#define PODBC_PER_STATEMENT_ROLLBACK (1L << 1)
/* Flags for the error handling */
#define PODBC_ALLOW_PARTIAL_EXTRACT 1L
#define PODBC_ERROR_CLEAR (1L << 1)
#define SC_get_errornumber(a) (a->__error_number)
#define SC_set_errornumber(a, n) (a->__error_number = n)
#define SC_get_errormsg(a) (a->__error_message)
-#define SC_get_errormsg(a) (a->__error_message)
#define SC_is_prepare_statement(a) (0 != (a->prepare & PREPARE_STATEMENT))
#define SC_get_prepare_method(a) (a->prepare & (~PREPARE_STATEMENT))