home *** CD-ROM | disk | FTP | other *** search
- .Na "dbwillconvert"
- .Aa
- .Fu
- Determine whether a specific datatype conversion is
- available within \*L.
- .Ih "datatype conversion"
- .Sy
- .Sf "DBBOOL dbwillconvert(srctype, desttype)"
- .Sp "int" "srctype"
- .Sp "int" "desttype"
- .Co
- .Bl
- This routine allows the program to determine whether
- \f2dbconvert()\f1 is capable of performing a specific
- datatype conversion.
- When \f2dbconvert()\f1 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.
- .Bl
- \f2dbconvert()\f1 can convert data stored in
- any of the \*S datatypes (although, of course,
- not all conversions are legal):
- .sp
- .nf
- .in +5n
- .ta +25n
- .ne 12.5v
- \f3\*S type Program variable type\f1
- .sp 0.5v
- SYBCHAR DBCHAR
- .mc |
- SYBTEXT DBCHAR
- .mc
- SYBBINARY DBBINARY
- .mc |
- SYBIMAGE DBBINARY
- .mc
- SYBINT1 DBTINYINT
- SYBINT2 DBSMALLINT
- SYBINT4 DBINT
- SYBFLT8 DBFLT8
- SYBBIT DBBIT
- SYBMONEY DBMONEY
- SYBDATETIME DBDATETIME
- .fi
- .in -5n
- .sp
- .Bl
- The table below lists the datatype conversions that
- \f2dbconvert()\f1 supports.
- The source datatypes are listed down the leftmost column and
- the destination datatypes are listed along the top row of the table.
- (For brevity, the prefix ``SYB'' has been eliminated from
- each datatype.)
- If \f2dbwillconvert()\f1 returns TRUE (T), the conversion is
- supported; if it returns FALSE (F), the conversion is not supported.
- .Ih "datatype conversion, supported"
- .sp
- .nf
- .in +3n
- .ps -4
- .vs -4
- .ta +17n +10n +10n +10n +10n +10n +10n +10n +10n +7n +13n
- .ne 17.5v
- \f3FROM: TO:\f1
- .sp 0.5v
- .mc |
- \f3 BIN- DATE-
- CHAR TEXT ARY IMAGE INT1 INT2 INT4 FLT8 BIT MONEY TIME\f1
- .ta +19n +10n +10n +10n +10n +10n +10n +10n +9n +10n +11n
- .sp 0.5v
- \f3CHAR\f1 T T T T T T T T T T T
- .sp 0.25v
- \f3TEXT\f1 T T T T T T T T T T T
- .sp 0.25v
- \f3BINARY\f1 T T T T T T T T T T F
- .sp 0.25v
- \f3IMAGE\f1 T T T T T T T T T T F
- .sp 0.25v
- \f3INT1\f1 T T T T T T T T T T F
- .sp 0.25v
- \f3INT2\f1 T T T T T T T T T T F
- .sp 0.25v
- \f3INT4\f1 T T T T T T T T T T F
- .sp 0.25v
- \f3FLT8\f1 T T T T T T T T T T F
- .sp 0.25v
- \f3BIT\f1 T T T T T T T T T F F
- .sp 0.25v
- \f3MONEY\f1 T T T T T T T T T T F
- .sp 0.25v
- \f3DATETIME\f1 T T T T F F F F F F T
- .fi
- .ps +4
- .vs +4
- .in -3n
- .sp 0.5v
- .mc
- .Bl
- See the manual page for \f2dbconvert()\f1 for more information on datatype conversions.
- .Bz
- .Pa
- .Pi srctype
- The datatype of the data which is to be converted.
- This parameter can be any of the \*S datatypes,
- as listed in the first table above.
- .Pi desttype
- The datatype that the source data is to be converted into.
- This parameter can be any of the \*S datatypes,
- as listed in the first table above.
- .in -.375i
- .Re
- .br
- TRUE if the datatype conversion is supported; FALSE if the conversion
- is not supported.
- .Sa
- dbaltbind,
- dbbind,
- dbconvert,
- types
-