Converts a SQL Server token value to a readable string.
LPCSTR dbprtype ( INT token );
where
A pointer to a null-terminated string that is the readable translation of the SQL Server token value. The pointer points to space that is never overwritten, so it is safe to call this function more than once in the same statement. If the token is unknown, the function returns a pointer to an empty string. The strings correspond to SQL Server datatype names.
Functions such as dbcoltype and dbalttype return SQL Server token values. To print out what the token value means, use dbprtype.
The following token values are used by dbprtype:
Token value | Datatype |
---|---|
SQLINT1 | tinyint |
SQLINT2 | smallint |
SQLINT4 | int |
SQLMONEY | money |
SLQFLT8 | float |
SQLDATETIME | datetime |
SQLBIT | bit |
SQLCHAR | char |
SQLVARCHAR | varchar |
SQLTEXT | text |
SQLBINARY | binary |
SQLVARBINARY | varbinary |
SQLIMAGE | image |
SQLDECIMAL | decimal |
SQLNUMERIC | numeric |
SQLINTN | integer-null |
SQLDATETIMN | datetime-null |
SQLMONEYN | money-null |
SQLFLTN | float-null |
SQLAOPSUM | sum |
SQLAOPAVG | avg |
SQLAOPCNT | count |
SQLAOPMIN | min |
SQLAOPMAX | max |
SQLDATETIM4 | smalldatetime |
SQLMONEY4 | smallmoney |
SQLFLT4 | real |
dbaltop, dbalttype, dbcoltype; DB-Library Datatypes; Microsoft SQL Server Transact-SQL Reference