home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Product / Product.zip / DBDEMO.ZIP / DEMOFLS.ZIP / DBCOMM.H < prev    next >
Text File  |  1991-07-03  |  2KB  |  47 lines

  1. /************************************************************************/
  2. /* DATABASE PERFORMANCE CONCEPTS AND TECHNIQUE DEMONSTRATION PROGRAM    */
  3. /* HEADER FILE                                                          */
  4. /* SOURCE - DBCOMM.C                                                    */
  5. /*  This file contains variable and function declarations used both by  */
  6. /*  the PM driver program and the imbedded SQL modules                  */
  7. /************************************************************************/
  8. #define TIMEFIELDS_LENGTH   200 // field length in dialog  box
  9. #define TABLENAME_LENGTH   32   // max table name length
  10.  
  11. #define  DEMO_RBLOCK    1    /* demo_num - Record Blocking */
  12. #define  DEMO_STATDYN   2
  13. #define  DEMO_ARI       3
  14. #define  DEMO_INDICES   4
  15. #define  DB_OK_RETURN   0    /* return from demo functions */
  16. #define  DB_BAD_RETURN  2
  17. #define  DB_NOT_AVAIL   4
  18. /************************************************************************/
  19. // Structure for data supplied by SQC programs.
  20. // the database modules fill this structure after running
  21. // test modules and the PM program displays them in the dialog
  22. // box
  23. /************************************************************************/
  24. typedef struct
  25.          {
  26.          short test_num;  //number of separate tests(modules)
  27.          unsigned char demoname[TIMEFIELDS_LENGTH]; // demo name
  28.          double demotime;     // time taken to run the test
  29.          long rows;           // number of rows retreived, not used
  30.          unsigned char tablename[TABLENAME_LENGTH];  // not used
  31.          long tablesize;                            // not used
  32.          } TIMETEXTStruct;
  33.  
  34. // There are a maimum of two test comparisons
  35. // This could be changed in the future for accomodating more tests
  36. extern TIMETEXTStruct Timetext[2];
  37.  
  38. extern long far GetTableSize(unsigned char *);
  39.  
  40. extern double qtime;
  41.  
  42. extern int num_runs; // number of iterations (user entered, default-1)
  43.  
  44. extern double q1avg; // Average time for running num_runs
  45. extern double q2avg; // iterations of each tests
  46. extern long error_sql; // sql error code returned from the function
  47.