home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / ptk / mips / srvdbtyp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-12  |  2.2 KB  |  94 lines

  1.  
  2.  
  3. #if !defined( DBTYPEDEFS )  // So we don't conflict with DBLIB definitions
  4. //
  5. // define data types
  6. //
  7. typedef unsigned char DBBOOL;
  8. typedef unsigned char DBBYTE;
  9. typedef unsigned char DBTINYINT;
  10. typedef short DBSMALLINT;
  11. typedef unsigned short DBUSMALLINT;
  12. typedef long DBINT;
  13. typedef char DBCHAR;
  14. typedef unsigned char DBBINARY;
  15. typedef unsigned char DBBIT;
  16. typedef double DBFLT8;
  17.  
  18. typedef int RETCODE;        // SUCCEED or FAIL
  19.  
  20. typedef struct srv_datetime { // DataServer datetime type 
  21.     long dtdays;            // number of days since 1/1/1900
  22.     unsigned long dttime;   // number 300th second since mid
  23.  
  24. } DBDATETIME;
  25.  
  26. typedef struct srv_money {   // DataServer money type 
  27.     long mnyhigh;
  28.     unsigned long mnylow;
  29.  
  30. } DBMONEY;
  31.  
  32. #ifdef _OS2
  33. typedef unsigned short BOOL;
  34. #else
  35. typedef int         BOOL;
  36. #endif
  37. typedef unsigned char BYTE;
  38.  
  39. // These are version 4.2 additions                                      
  40. //
  41. typedef float DBFLT4;
  42. typedef long DBMONEY4;
  43.  
  44. #define DBREAL  DBFLT4
  45. typedef struct dbdatetime4 {
  46.     unsigned short numdays; // No of days since Jan-1-1900             
  47.     unsigned short nummins; // No. of minutes since midnight           
  48. } DBDATETIM4;
  49.  
  50. /* DBDATEREC structure used by dbdatecrack. This is a version 4.2 addition */
  51. typedef struct dbdaterec
  52. {
  53.     int     year;        /* 1753 - 9999 */
  54.     int     quarter;        /* 1 - 4 */
  55.     int     month;        /* 1 - 12 */
  56.     int     dayofyear;        /* 1 - 366 */
  57.     int     day;        /* 1 - 31 */
  58.     int     week;        /* 1 - 54 (for leap years) */
  59.     int     weekday;        /* 1 - 7  (Mon - Sun) */
  60.     int     hour;        /* 0 - 23 */
  61.     int     minute;        /* 0 - 59 */
  62.     int     second;        /* 0 - 59 */
  63.     int     millisecond;    /* 0 - 999 */
  64. } DBDATEREC;
  65.  
  66. #define MAXNUMERICLEN    16
  67.  
  68. // These are version 6.0 additions
  69. //
  70.  
  71. // Defined identically in OLE-DB header. If OLE-DB header previously included
  72. // skip redefinition.
  73. //
  74. #if !defined (__oledb_h__)
  75. typedef struct dbnumeric
  76. {
  77.     BYTE precision;
  78.     BYTE scale;
  79.     BYTE sign;
  80.     BYTE val[MAXNUMERICLEN];
  81. } DBNUMERIC;
  82. #endif // !defined (__oledb_h__)
  83.  
  84. typedef DBNUMERIC DBDECIMAL;
  85.  
  86.  
  87. #endif  // #if !defined( DBTYPEDEFS )
  88.  
  89. #if !defined( DBPROGNLEN )
  90.  
  91. #define DBPROGNLEN  10
  92.  
  93. #endif
  94.