home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / usr / sybase / doc / dbwillconvert.man < prev    next >
Encoding:
Text File  |  1993-04-22  |  4.3 KB  |  111 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89            dbwillconvert
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbwillconvert
  6.  
  7.   FUNCTION:
  8.        Determine whether a specific  datatype  conversion  is  available
  9.        within DB-Library.
  10.  
  11.   SYNTAX:
  12.        DBBOOL dbwillconvert(srctype, desttype)
  13.  
  14.        int       srctype;
  15.        int       desttype;
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbwillconvert           Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o This routine allows the program  to  determine  whether  dbcon-
  30.          vert() is capable of performing a specific datatype conversion.
  31.          When dbconvert() is asked  to  perform  a  conversion  that  it
  32.          doesn't  support,  it  calls  a user-supplied error handler (if
  33.          any), sets a global error number, and returns FAIL.
  34.        o dbconvert() can convert data stored in any  of  the  SQL Server
  35.          datatypes (although, of course, not all conversions are legal):
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89            dbwillconvert
  47.   ______________________________________________________________________
  48.               SQL Server type          Program variable type
  49.  
  50.               SYBCHAR                  DBCHAR
  51.               SYBTEXT                  DBCHAR
  52.               SYBBINARY                DBBINARY
  53.               SYBIMAGE                 DBBINARY
  54.               SYBINT1                  DBTINYINT
  55.               SYBINT2                  DBSMALLINT
  56.               SYBINT4                  DBINT
  57.               SYBFLT8                  DBFLT8
  58.               SYBBIT                   DBBIT
  59.               SYBMONEY                 DBMONEY
  60.               SYBDATETIME              DBDATETIME
  61.  
  62.        o The table below lists the datatype conversions that dbconvert()
  63.          supports.   The  source  datatypes are listed down the leftmost
  64.          column and the destination datatypes are listed along  the  top
  65.  
  66.  
  67.  
  68.   dbwillconvert           Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.          row of the table.  (For brevity,  the  prefix  "SYB"  has  been
  71.          eliminated from each datatype.) If dbwillconvert() returns TRUE
  72.          (T), the conversion is supported; if it returns FALSE (F),  the
  73.          conversion is not supported.
  74.  
  75.             FROM:            TO:                 BIN-                                                                            DATE-
  76.             CHAR             CHATR      TEXTT      ARYT       IMATGE     INTT1      INTT2      INTT4      FLTT8      BITT    MONEYT        TIMTE
  77.             TBEIXNTARY             TT         TT         TT         TT         TT         TT         TT         TT        TT         TT          TF
  78.             IIMNATG1E              TT         TT         TT         TT         TT         TT         TT         TT        TT         TT          FF
  79.             IINNTT24               TT         TT         TT         TT         TT         TT         TT         TT        TT         TT          FF
  80.             FBLITT8               TT         TT         TT         TT         TT         TT         TT         TT        TT         TF          FF
  81.             MDOANTEEYTIME           TT         TT         TT         TT         TF         TF         TF         TF        TF         TF          FT
  82.  
  83.        o See the manual page for dbconvert()  for  more  information  on
  84.          datatype conversions.
  85.  
  86.   PARAMETERS:
  87.  
  88.  
  89.  
  90.   5                       Version 4.0 -- 5/1/89            dbwillconvert
  91.   ______________________________________________________________________
  92.        srctype -  The datatype of the data which  is  to  be  converted.
  93.            This  parameter  can  be  any of the SQL Server datatypes, as
  94.            listed in the first table above.
  95.        desttype -  The datatype that the source data is to be  converted
  96.            into.  This parameter can be any of the SQL Server datatypes,
  97.            as listed in the first table above.
  98.  
  99.   RETURNS:
  100.        TRUE if the  datatype  conversion  is  supported;  FALSE  if  the
  101.        conversion is not supported.
  102.  
  103.   SEE ALSO:
  104.        dbaltbind, dbbind, dbconvert, types
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.