home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbwillconvert
- ______________________________________________________________________
-
- NAME: dbwillconvert
-
- FUNCTION:
- Determine whether a specific datatype conversion is available
- within DB-Library.
-
- SYNTAX:
- DBBOOL dbwillconvert(srctype, desttype)
-
- int srctype;
- int desttype;
-
-
-
-
-
-
-
-
- dbwillconvert Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- COMMENTS:
-
- o This routine allows the program to determine whether dbcon-
- vert() is capable of performing a specific datatype conversion.
- When dbconvert() is asked to perform a conversion that it
- doesn't support, it calls a user-supplied error handler (if
- any), sets a global error number, and returns FAIL.
- o dbconvert() can convert data stored in any of the SQL Server
- datatypes (although, of course, not all conversions are legal):
-
-
-
-
-
-
-
-
-
-
- 3 Version 4.0 -- 5/1/89 dbwillconvert
- ______________________________________________________________________
- SQL Server type Program variable type
-
- SYBCHAR DBCHAR
- SYBTEXT DBCHAR
- SYBBINARY DBBINARY
- SYBIMAGE DBBINARY
- SYBINT1 DBTINYINT
- SYBINT2 DBSMALLINT
- SYBINT4 DBINT
- SYBFLT8 DBFLT8
- SYBBIT DBBIT
- SYBMONEY DBMONEY
- SYBDATETIME DBDATETIME
-
- o The table below lists the datatype conversions that dbconvert()
- supports. The source datatypes are listed down the leftmost
- column and the destination datatypes are listed along the top
-
-
-
- dbwillconvert Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
- row of the table. (For brevity, the prefix "SYB" has been
- eliminated from each datatype.) If dbwillconvert() returns TRUE
- (T), the conversion is supported; if it returns FALSE (F), the
- conversion is not supported.
-
- FROM: TO: BIN- DATE-
- CHAR CHATR TEXTT ARYT IMATGE INTT1 INTT2 INTT4 FLTT8 BITT MONEYT TIMTE
- TBEIXNTARY TT TT TT TT TT TT TT TT TT TT TF
- IIMNATG1E TT TT TT TT TT TT TT TT TT TT FF
- IINNTT24 TT TT TT TT TT TT TT TT TT TT FF
- FBLITT8 TT TT TT TT TT TT TT TT TT TF FF
- MDOANTEEYTIME TT TT TT TT TF TF TF TF TF TF FT
-
- o See the manual page for dbconvert() for more information on
- datatype conversions.
-
- PARAMETERS:
-
-
-
- 5 Version 4.0 -- 5/1/89 dbwillconvert
- ______________________________________________________________________
- srctype - The datatype of the data which is to be converted.
- This parameter can be any of the SQL Server datatypes, as
- listed in the first table above.
- desttype - The datatype that the source data is to be converted
- into. This parameter can be any of the SQL Server datatypes,
- as listed in the first table above.
-
- RETURNS:
- TRUE if the datatype conversion is supported; FALSE if the
- conversion is not supported.
-
- SEE ALSO:
- dbaltbind, dbbind, dbconvert, types
-
-
-
-
-
-
-