Enhanced the DataTypeSupported() function to show the native data type name that is being automatically used by the wxODBC class column types

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2002-06-13 17:51:56 +00:00
parent ff294e0eba
commit aaf0836c8b

View File

@@ -68,14 +68,18 @@ extern wxChar ListDB_Selection2[]; /* Used to return the second column value fo
#endif #endif
bool DataTypeSupported(wxDb *pDb, SWORD datatype) bool DataTypeSupported(wxDb *pDb, SWORD datatype, wxString *nativeDataTypeName)
{ {
wxDbSqlTypeInfo sqlTypeInfo; wxDbSqlTypeInfo sqlTypeInfo;
bool breakpoint = FALSE; bool breakpoint = FALSE;
*nativeDataTypeName = wxEmptyString;
if (pDb->GetDataTypeInfo(datatype, sqlTypeInfo)) if (pDb->GetDataTypeInfo(datatype, sqlTypeInfo))
{
*nativeDataTypeName = sqlTypeInfo.TypeName;
breakpoint = TRUE; breakpoint = TRUE;
}
return breakpoint; return breakpoint;
@@ -85,263 +89,517 @@ bool DataTypeSupported(wxDb *pDb, SWORD datatype)
void CheckSupportForAllDataTypes(wxDb *pDb) void CheckSupportForAllDataTypes(wxDb *pDb)
{ {
wxString nativeDataTypeName;
wxLogMessage("\nThe following datatypes are supported by the\ndatabase you are currently connected to:"); wxLogMessage("\nThe following datatypes are supported by the\ndatabase you are currently connected to:");
#ifdef SQL_C_BINARY #ifdef SQL_C_BINARY
if (DataTypeSupported(pDb,SQL_C_BINARY)) if (DataTypeSupported(pDb,SQL_C_BINARY, &nativeDataTypeName))
wxLogMessage("SQL_C_BINARY"); {
nativeDataTypeName = "SQL_C_BINARY (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_BIT #ifdef SQL_C_BIT
if (DataTypeSupported(pDb,SQL_C_BIT)) if (DataTypeSupported(pDb,SQL_C_BIT, &nativeDataTypeName))
wxLogMessage("SQL_C_BIT"); {
nativeDataTypeName = "SQL_C_BIT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_BOOKMARK #ifdef SQL_C_BOOKMARK
if (DataTypeSupported(pDb,SQL_C_BOOKMARK)) if (DataTypeSupported(pDb,SQL_C_BOOKMARK, &nativeDataTypeName))
wxLogMessage("SQL_C_BOOKMARK"); {
nativeDataTypeName = "SQL_C_BOOKMARK (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_CHAR #ifdef SQL_C_CHAR
if (DataTypeSupported(pDb,SQL_C_CHAR)) if (DataTypeSupported(pDb,SQL_C_CHAR, &nativeDataTypeName))
wxLogMessage("SQL_C_CHAR"); {
nativeDataTypeName = "SQL_C_CHAR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_DATE #ifdef SQL_C_DATE
if (DataTypeSupported(pDb,SQL_C_DATE)) if (DataTypeSupported(pDb,SQL_C_DATE, &nativeDataTypeName))
wxLogMessage("SQL_C_DATE"); {
nativeDataTypeName = "SQL_C_DATE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_DEFAULT #ifdef SQL_C_DEFAULT
if (DataTypeSupported(pDb,SQL_C_DEFAULT)) if (DataTypeSupported(pDb,SQL_C_DEFAULT, &nativeDataTypeName))
wxLogMessage("SQL_C_DEFAULT"); {
nativeDataTypeName = "SQL_C_DEFAULT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_DOUBLE #ifdef SQL_C_DOUBLE
if (DataTypeSupported(pDb,SQL_C_DOUBLE)) if (DataTypeSupported(pDb,SQL_C_DOUBLE, &nativeDataTypeName))
wxLogMessage("SQL_C_DOUBLE"); {
nativeDataTypeName = "SQL_C_DOUBLE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_FLOAT #ifdef SQL_C_FLOAT
if (DataTypeSupported(pDb,SQL_C_FLOAT)) if (DataTypeSupported(pDb,SQL_C_FLOAT, &nativeDataTypeName))
wxLogMessage("SQL_C_FLOAT"); {
nativeDataTypeName = "SQL_C_FLOAT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_GUID #ifdef SQL_C_GUID
if (DataTypeSupported(pDb,SQL_C_GUID)) if (DataTypeSupported(pDb,SQL_C_GUID, &nativeDataTypeName))
wxLogMessage("SQL_C_GUID"); {
nativeDataTypeName = "SQL_C_GUID (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_DAY #ifdef SQL_C_INTERVAL_DAY
if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_DAY"); {
nativeDataTypeName = "SQL_C_INTERVAL_DAY (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_DAY_TO_HOUR #ifdef SQL_C_INTERVAL_DAY_TO_HOUR
if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY_TO_HOUR)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY_TO_HOUR, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_DAY_TO_HOUR"); {
nativeDataTypeName = "SQL_C_INTERVAL_DAY_TO_HOUR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_DAY_TO_MINUTE #ifdef SQL_C_INTERVAL_DAY_TO_MINUTE
if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY_TO_MINUTE)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY_TO_MINUTE, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_DAY_TO_MINUTE"); {
nativeDataTypeName = "SQL_C_INTERVAL_DAY_TO_MINUTE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_DAY_TO_SECOND #ifdef SQL_C_INTERVAL_DAY_TO_SECOND
if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY_TO_SECOND)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_DAY_TO_SECOND, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_DAY_TO_SECOND"); {
nativeDataTypeName = "SQL_C_INTERVAL_DAY_TO_SECOND (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_HOUR #ifdef SQL_C_INTERVAL_HOUR
if (DataTypeSupported(pDb,SQL_C_INTERVAL_HOUR)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_HOUR, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_HOUR"); {
nativeDataTypeName = "SQL_C_INTERVAL_HOUR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_HOUR_TO_MINUTE #ifdef SQL_C_INTERVAL_HOUR_TO_MINUTE
if (DataTypeSupported(pDb,SQL_C_INTERVAL_HOUR_TO_MINUTE)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_HOUR_TO_MINUTE, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_HOUR_TO_MINUTE"); {
nativeDataTypeName = "SQL_C_INTERVAL_HOUR_TO_MINUTE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_HOUR_TO_SECOND #ifdef SQL_C_INTERVAL_HOUR_TO_SECOND
if (DataTypeSupported(pDb,SQL_C_INTERVAL_HOUR_TO_SECOND)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_HOUR_TO_SECOND, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_HOUR_TO_SECOND"); {
nativeDataTypeName = "SQL_C_INTERVAL_HOUR_TO_SECOND (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_MINUTE #ifdef SQL_C_INTERVAL_MINUTE
if (DataTypeSupported(pDb,SQL_C_INTERVAL_MINUTE)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_MINUTE, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_MINUTE"); {
nativeDataTypeName = "SQL_C_INTERVAL_MINUTE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_MINUTE_TO_SECOND #ifdef SQL_C_INTERVAL_MINUTE_TO_SECOND
if (DataTypeSupported(pDb,SQL_C_INTERVAL_MINUTE_TO_SECOND)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_MINUTE_TO_SECOND, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_MINUTE_TO_SECOND"); {
nativeDataTypeName = "SQL_C_INTERVAL_MINUTE_TO_SECOND (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_MONTH #ifdef SQL_C_INTERVAL_MONTH
if (DataTypeSupported(pDb,SQL_C_INTERVAL_MONTH)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_MONTH, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_MONTH"); {
nativeDataTypeName = "SQL_C_INTERVAL_MONTH (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_SECOND #ifdef SQL_C_INTERVAL_SECOND
if (DataTypeSupported(pDb,SQL_C_INTERVAL_SECOND)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_SECOND, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_SECOND"); {
nativeDataTypeName = "SQL_C_INTERVAL_SECOND (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_YEAR #ifdef SQL_C_INTERVAL_YEAR
if (DataTypeSupported(pDb,SQL_C_INTERVAL_YEAR)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_YEAR, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_YEAR"); {
nativeDataTypeName = "SQL_C_INTERVAL_YEAR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_INTERVAL_YEAR_TO_MONTH #ifdef SQL_C_INTERVAL_YEAR_TO_MONTH
if (DataTypeSupported(pDb,SQL_C_INTERVAL_YEAR_TO_MONTH)) if (DataTypeSupported(pDb,SQL_C_INTERVAL_YEAR_TO_MONTH, &nativeDataTypeName))
wxLogMessage("SQL_C_INTERVAL_YEAR_TO_MONTH"); {
nativeDataTypeName = "SQL_C_INTERVAL_YEAR_TO_MONTH (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_LONG #ifdef SQL_C_LONG
if (DataTypeSupported(pDb,SQL_C_LONG)) if (DataTypeSupported(pDb,SQL_C_LONG, &nativeDataTypeName))
wxLogMessage("SQL_C_LONG"); {
nativeDataTypeName = "SQL_C_LONG (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_NUMERIC #ifdef SQL_C_NUMERIC
if (DataTypeSupported(pDb,SQL_C_NUMERIC)) if (DataTypeSupported(pDb,SQL_C_NUMERIC, &nativeDataTypeName))
wxLogMessage("SQL_C_NUMERIC"); {
nativeDataTypeName = "SQL_C_NUMERIC (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_SBIGINT #ifdef SQL_C_SBIGINT
if (DataTypeSupported(pDb,SQL_C_SBIGINT)) if (DataTypeSupported(pDb,SQL_C_SBIGINT, &nativeDataTypeName))
wxLogMessage("SQL_C_SBIGINT"); {
nativeDataTypeName = "SQL_C_SBIGINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_SHORT #ifdef SQL_C_SHORT
if (DataTypeSupported(pDb,SQL_C_SHORT)) if (DataTypeSupported(pDb,SQL_C_SHORT, &nativeDataTypeName))
wxLogMessage("SQL_C_SHORT"); {
nativeDataTypeName = "SQL_C_SHORT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_SLONG #ifdef SQL_C_SLONG
if (DataTypeSupported(pDb,SQL_C_SLONG)) if (DataTypeSupported(pDb,SQL_C_SLONG, &nativeDataTypeName))
wxLogMessage("SQL_C_SLONG"); {
nativeDataTypeName = "SQL_C_SLONG (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_SSHORT #ifdef SQL_C_SSHORT
if (DataTypeSupported(pDb,SQL_C_SSHORT)) if (DataTypeSupported(pDb,SQL_C_SSHORT, &nativeDataTypeName))
wxLogMessage("SQL_C_SSHORT"); {
nativeDataTypeName = "SQL_C_SSHORT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_STINYINT #ifdef SQL_C_STINYINT
if (DataTypeSupported(pDb,SQL_C_STINYINT)) if (DataTypeSupported(pDb,SQL_C_STINYINT, &nativeDataTypeName))
wxLogMessage("SQL_C_STINYINT"); {
nativeDataTypeName = "SQL_C_STINYINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_TIME #ifdef SQL_C_TIME
if (DataTypeSupported(pDb,SQL_C_TIME)) if (DataTypeSupported(pDb,SQL_C_TIME, &nativeDataTypeName))
wxLogMessage("SQL_C_TIME"); {
nativeDataTypeName = "SQL_C_TIME (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_TIMESTAMP #ifdef SQL_C_TIMESTAMP
if (DataTypeSupported(pDb,SQL_C_TIMESTAMP)) if (DataTypeSupported(pDb,SQL_C_TIMESTAMP, &nativeDataTypeName))
wxLogMessage("SQL_C_TIMESTAMP"); {
nativeDataTypeName = "SQL_C_TIMESTAMP (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_TINYINT #ifdef SQL_C_TINYINT
if (DataTypeSupported(pDb,SQL_C_TINYINT)) if (DataTypeSupported(pDb,SQL_C_TINYINT, &nativeDataTypeName))
wxLogMessage("SQL_C_TINYINT"); {
nativeDataTypeName = "SQL_C_TINYINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_TYPE_DATE #ifdef SQL_C_TYPE_DATE
if (DataTypeSupported(pDb,SQL_C_TYPE_DATE)) if (DataTypeSupported(pDb,SQL_C_TYPE_DATE, &nativeDataTypeName))
wxLogMessage("SQL_C_TYPE_DATE"); {
nativeDataTypeName = "SQL_C_TYPE_DATE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_TYPE_TIME #ifdef SQL_C_TYPE_TIME
if (DataTypeSupported(pDb,SQL_C_TYPE_TIME)) if (DataTypeSupported(pDb,SQL_C_TYPE_TIME, &nativeDataTypeName))
wxLogMessage("SQL_C_TYPE_TIME"); {
nativeDataTypeName = "SQL_C_TYPE_TIME (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_TYPE_TIMESTAMP #ifdef SQL_C_TYPE_TIMESTAMP
if (DataTypeSupported(pDb,SQL_C_TYPE_TIMESTAMP)) if (DataTypeSupported(pDb,SQL_C_TYPE_TIMESTAMP, &nativeDataTypeName))
wxLogMessage("SQL_C_TYPE_TIMESTAMP"); {
nativeDataTypeName = "SQL_C_TYPE_TIMESTAMP (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_UBIGINT #ifdef SQL_C_UBIGINT
if (DataTypeSupported(pDb,SQL_C_UBIGINT)) if (DataTypeSupported(pDb,SQL_C_UBIGINT, &nativeDataTypeName))
wxLogMessage("SQL_C_UBIGINT"); {
nativeDataTypeName = "SQL_C_UBIGINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_ULONG #ifdef SQL_C_ULONG
if (DataTypeSupported(pDb,SQL_C_ULONG)) if (DataTypeSupported(pDb,SQL_C_ULONG, &nativeDataTypeName))
wxLogMessage("SQL_C_ULONG"); {
nativeDataTypeName = "SQL_C_ULONG (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_USHORT #ifdef SQL_C_USHORT
if (DataTypeSupported(pDb,SQL_C_USHORT)) if (DataTypeSupported(pDb,SQL_C_USHORT, &nativeDataTypeName))
wxLogMessage("SQL_C_USHORT"); {
nativeDataTypeName = "SQL_C_USHORT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_UTINYINT #ifdef SQL_C_UTINYINT
if (DataTypeSupported(pDb,SQL_C_UTINYINT)) if (DataTypeSupported(pDb,SQL_C_UTINYINT, &nativeDataTypeName))
wxLogMessage("SQL_C_UTINYINT"); {
nativeDataTypeName = "SQL_C_UTINYINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_C_VARBOOKMARK #ifdef SQL_C_VARBOOKMARK
if (DataTypeSupported(pDb,SQL_C_VARBOOKMARK)) if (DataTypeSupported(pDb,SQL_C_VARBOOKMARK, &nativeDataTypeName))
wxLogMessage("SQL_C_VARBOOKMARK"); {
nativeDataTypeName = "SQL_C_VARBOOKMARK (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
// Extended SQL types // Extended SQL types
#ifdef SQL_DATE #ifdef SQL_DATE
if (DataTypeSupported(pDb,SQL_DATE)) if (DataTypeSupported(pDb,SQL_DATE, &nativeDataTypeName))
wxLogMessage("SQL_DATE"); {
nativeDataTypeName = "SQL_DATE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_INTERVAL #ifdef SQL_INTERVAL
if (DataTypeSupported(pDb,SQL_INTERVAL)) if (DataTypeSupported(pDb,SQL_INTERVAL, &nativeDataTypeName))
wxLogMessage("SQL_INTERVAL"); {
nativeDataTypeName = "SQL_INTERVAL (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_TIME #ifdef SQL_TIME
if (DataTypeSupported(pDb,SQL_TIME)) if (DataTypeSupported(pDb,SQL_TIME, &nativeDataTypeName))
wxLogMessage("SQL_TIME"); {
nativeDataTypeName = "SQL_TIME (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_TIMESTAMP #ifdef SQL_TIMESTAMP
if (DataTypeSupported(pDb,SQL_TIMESTAMP)) if (DataTypeSupported(pDb,SQL_TIMESTAMP, &nativeDataTypeName))
wxLogMessage("SQL_TIMESTAMP"); {
nativeDataTypeName = "SQL_TIMESTAMP (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_LONGVARCHAR #ifdef SQL_LONGVARCHAR
if (DataTypeSupported(pDb,SQL_LONGVARCHAR)) if (DataTypeSupported(pDb,SQL_LONGVARCHAR, &nativeDataTypeName))
wxLogMessage("SQL_LONGVARCHAR"); {
nativeDataTypeName = "SQL_LONGVARCHAR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_BINARY #ifdef SQL_BINARY
if (DataTypeSupported(pDb,SQL_BINARY)) if (DataTypeSupported(pDb,SQL_BINARY, &nativeDataTypeName))
wxLogMessage("SQL_BINARY"); {
nativeDataTypeName = "SQL_BINARY (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_VARBINARY #ifdef SQL_VARBINARY
if (DataTypeSupported(pDb,SQL_VARBINARY)) if (DataTypeSupported(pDb,SQL_VARBINARY, &nativeDataTypeName))
wxLogMessage("SQL_VARBINARY"); {
nativeDataTypeName = "SQL_VARBINARY (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_LONGVARBINARY #ifdef SQL_LONGVARBINARY
if (DataTypeSupported(pDb,SQL_LONGVARBINARY)) if (DataTypeSupported(pDb,SQL_LONGVARBINARY, &nativeDataTypeName))
wxLogMessage("SQL_LONGVARBINARY"); {
nativeDataTypeName = "SQL_LOGVARBINARY (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_BIGINT #ifdef SQL_BIGINT
if (DataTypeSupported(pDb,SQL_BIGINT)) if (DataTypeSupported(pDb,SQL_BIGINT, &nativeDataTypeName))
wxLogMessage("SQL_BIGINT"); {
nativeDataTypeName = "SQL_BIGINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_TINYINT #ifdef SQL_TINYINT
if (DataTypeSupported(pDb,SQL_TINYINT)) if (DataTypeSupported(pDb,SQL_TINYINT, &nativeDataTypeName))
wxLogMessage("SQL_TINYINT"); {
nativeDataTypeName = "SQL_TINYINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_BIT #ifdef SQL_BIT
if (DataTypeSupported(pDb,SQL_BIT)) if (DataTypeSupported(pDb,SQL_BIT, &nativeDataTypeName))
wxLogMessage("SQL_BIT"); {
nativeDataTypeName = "SQL_BIT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_GUID #ifdef SQL_GUID
if (DataTypeSupported(pDb,SQL_GUID)) if (DataTypeSupported(pDb,SQL_GUID, &nativeDataTypeName))
wxLogMessage("SQL_GUID"); {
nativeDataTypeName = "SQL_GUID (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_CHAR #ifdef SQL_CHAR
if (DataTypeSupported(pDb,SQL_CHAR)) if (DataTypeSupported(pDb,SQL_CHAR, &nativeDataTypeName))
wxLogMessage("SQL_CHAR"); {
nativeDataTypeName = "SQL_CHAR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_INTEGER #ifdef SQL_INTEGER
if (DataTypeSupported(pDb,SQL_INTEGER)) if (DataTypeSupported(pDb,SQL_INTEGER, &nativeDataTypeName))
wxLogMessage("SQL_INTEGER"); {
nativeDataTypeName = "SQL_INTEGER (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_SMALLINT #ifdef SQL_SMALLINT
if (DataTypeSupported(pDb,SQL_SMALLINT)) if (DataTypeSupported(pDb,SQL_SMALLINT, &nativeDataTypeName))
wxLogMessage("SQL_SMALLINT"); {
nativeDataTypeName = "SQL_SAMLLINT (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_REAL #ifdef SQL_REAL
if (DataTypeSupported(pDb,SQL_REAL)) if (DataTypeSupported(pDb,SQL_REAL, &nativeDataTypeName))
wxLogMessage("SQL_REAL"); {
nativeDataTypeName = "SQL_REAL (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_DOUBLE #ifdef SQL_DOUBLE
if (DataTypeSupported(pDb,SQL_DOUBLE)) if (DataTypeSupported(pDb,SQL_DOUBLE, &nativeDataTypeName))
wxLogMessage("SQL_DOUBLE"); {
nativeDataTypeName = "SQL_DOUBLE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_NUMERIC #ifdef SQL_NUMERIC
if (DataTypeSupported(pDb,SQL_NUMERIC)) if (DataTypeSupported(pDb,SQL_NUMERIC, &nativeDataTypeName))
wxLogMessage("SQL_NUMERIC"); {
nativeDataTypeName = "SQL_NUMERIC (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_DATE #ifdef SQL_DATE
if (DataTypeSupported(pDb,SQL_DATE)) if (DataTypeSupported(pDb,SQL_DATE, &nativeDataTypeName))
wxLogMessage("SQL_DATE"); {
nativeDataTypeName = "SQL_DATE (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_TIME #ifdef SQL_TIME
if (DataTypeSupported(pDb,SQL_TIME)) if (DataTypeSupported(pDb,SQL_TIME, &nativeDataTypeName))
wxLogMessage("SQL_TIME"); {
nativeDataTypeName = "SQL_TIME (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_TIMESTAMP #ifdef SQL_TIMESTAMP
if (DataTypeSupported(pDb,SQL_TIMESTAMP)) if (DataTypeSupported(pDb,SQL_TIMESTAMP, &nativeDataTypeName))
wxLogMessage("SQL_TIMESTAMP"); {
nativeDataTypeName = "SQL_TIMESTAMP (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
#ifdef SQL_VARCHAR #ifdef SQL_VARCHAR
if (DataTypeSupported(pDb,SQL_VARCHAR)) if (DataTypeSupported(pDb,SQL_VARCHAR, &nativeDataTypeName))
wxLogMessage("SQL_VARCHAR"); {
nativeDataTypeName = "SQL_VARCHAR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
// UNICODE // UNICODE
#ifdef SQL_C_TCHAR #ifdef SQL_C_TCHAR
if (DataTypeSupported(pDb,SQL_C_TCHAR)) if (DataTypeSupported(pDb,SQL_C_TCHAR, &nativeDataTypeName))
wxLogMessage("SQL_C_TCHAR (Unicode support is possible)"); {
nativeDataTypeName = "SQL_C_TCHAR (" + nativeDataTypeName;
nativeDataTypeName += ")";
wxLogMessage(nativeDataTypeName);
}
#endif #endif
wxLogMessage("\n"); wxLogMessage("\n");