void
_trace_func_result (
    SQLUSMALLINT	  fFunc, 
    SQLUSMALLINT	* pfExists, 
    int			  output)
{
  int i;

  if (fFunc == SQL_API_ALL_FUNCTIONS)
    {
      _trace_usmallint_p (pfExists, 0);

      if (!output)
        return;

      for (i = 1; i < 100; i++)
	if (pfExists[i])
	  _trace_func_name (i, 0);
    }
#if (ODBCVER >= 0x0300)
  else if (fFunc == SQL_API_ODBC3_ALL_FUNCTIONS)
    {
      if (!output)
        return;

      _trace_usmallint_p (pfExists, 0);
      for (i = 1; i < SQL_API_ODBC3_ALL_FUNCTIONS; i++)
	if (SQL_FUNC_EXISTS (pfExists, i))
	  _trace_func_name (i, 0);
    }
#endif
  else
    {
      _trace_usmallint_p (pfExists, output);
    }
}
Exemple #2
0
SQLRETURN SQL_API
SQLGetFunctions(SQLHDBC ConnectionHandle,
		SQLUSMALLINT FunctionId,
		SQLUSMALLINT *SupportedPtr)
{
	ODBCDbc *dbc = (ODBCDbc *) ConnectionHandle;

#ifdef ODBCDEBUG
	ODBCLOG("SQLGetFunctions " PTRFMT " %s\n",
		PTRFMTCAST ConnectionHandle, translateFunctionId(FunctionId));
#endif

	if (!isValidDbc(dbc))
		return SQL_INVALID_HANDLE;

	clearDbcErrors(dbc);

	if (!SQL_FUNC_EXISTS(FuncExistMap, FuncImplemented[0])) {
		/* not yet initialized, so do it now */
		UWORD *p;

		for (p = FuncImplemented; p < &FuncImplemented[NFUNCIMPLEMENTED]; p++)
			FuncExistMap[*p >> 4] |= 1 << (*p & 0xF);
	}