home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sysmgmt / sms / vbsmsapi / common / qrycodes.bas < prev    next >
Encoding:
BASIC Source File  |  1996-10-15  |  9.3 KB  |  284 lines

  1. Option Explicit
  2. '// *************************************************************************
  3. '//
  4. '//  File: QRYCODES.H
  5. '//
  6. '//  Copyright (c) 1994, Microsoft Corp.
  7. '//
  8. '//
  9. '//
  10. '//  This file contains the Query operator manifests for queries against
  11. '//  machines. This is part of the SMS SDK.
  12. '//
  13. '//
  14. '//  History:
  15. '//      JonShu      01-April-1994       Created.
  16. '//                                      This was extracted from query.h
  17. '//      GFF@SEA     17-Mar-95           VBified.
  18. '//
  19. '// *************************************************************************
  20. '
  21. '// Query Operators.
  22. '// ================
  23. '
  24.  Global Const QOP_NOOP = 0
  25. '
  26.  Global Const QOP_BOOL_EQ = 1
  27.  Global Const QOP_BOOL_NEQ = 2
  28.  Global Const QOP_BOOL_FIRST = QOP_BOOL_EQ
  29.  Global Const QOP_BOOL_LAST = QOP_BOOL_NEQ
  30. '
  31.  Global Const QOP_NUMERIC_EQ = 3
  32.  Global Const QOP_NUMERIC_NEQ = 4
  33.  Global Const QOP_NUMERIC_GT = 5
  34.  Global Const QOP_NUMERIC_LT = 6
  35.  Global Const QOP_NUMERIC_GTE = 7
  36.  Global Const QOP_NUMERIC_LTE = 8
  37.  Global Const QOP_NUMERIC_FIRST = QOP_NUMERIC_EQ
  38.  Global Const QOP_NUMERIC_LAST = QOP_NUMERIC_LTE
  39. '
  40.  Global Const QOP_STR_EQ = 9
  41.  Global Const QOP_STR_NEQ = 10
  42.  Global Const QOP_STR_GT = 11
  43.  Global Const QOP_STR_LT = 12
  44.  Global Const QOP_STR_GTE = 13
  45.  Global Const QOP_STR_LTE = 14
  46.  Global Const QOP_STR_LIKE = 15
  47.  Global Const QOP_STR_NOTLIKE = 16
  48.  Global Const QOP_STR_FIRST = QOP_STR_EQ
  49.  Global Const QOP_STR_LAST = QOP_STR_NOTLIKE
  50. '
  51.  Global Const QOP_UPCASE_EQ = 17
  52.  Global Const QOP_UPCASE_NEQ = 18
  53.  Global Const QOP_UPCASE_GT = 19
  54.  Global Const QOP_UPCASE_LT = 20
  55.  Global Const QOP_UPCASE_GTE = 21
  56.  Global Const QOP_UPCASE_LTE = 22
  57.  Global Const QOP_UPCASE_LIKE = 23
  58.  Global Const QOP_UPCASE_NOTLIKE = 24
  59.  Global Const QOP_UPCASE_FIRST = QOP_UPCASE_EQ
  60.  Global Const QOP_UPCASE_LAST = QOP_UPCASE_NOTLIKE
  61. '
  62.  Global Const QOP_DATETIME_EQ = 25
  63.  Global Const QOP_DATETIME_NEQ = 26
  64.  Global Const QOP_DATETIME_GT = 27
  65.  Global Const QOP_DATETIME_LT = 28
  66.  Global Const QOP_DATETIME_GTE = 29
  67.  Global Const QOP_DATETIME_LTE = 30
  68.  Global Const QOP_DATETIME_FIRST = QOP_DATETIME_EQ
  69.  Global Const QOP_DATETIME_LAST = QOP_DATETIME_LTE
  70. '
  71.  Global Const QOP_DATE_EQ = 31
  72.  Global Const QOP_DATE_NEQ = 32
  73.  Global Const QOP_DATE_GT = 33
  74.  Global Const QOP_DATE_LT = 34
  75.  Global Const QOP_DATE_GTE = 35
  76.  Global Const QOP_DATE_LTE = 36
  77.  Global Const QOP_DATE_FIRST = QOP_DATE_EQ
  78.  Global Const QOP_DATE_LAST = QOP_DATE_LTE
  79. '
  80.  Global Const QOP_TIME_EQ = 37
  81.  Global Const QOP_TIME_NEQ = 38
  82.  Global Const QOP_TIME_GT = 39
  83.  Global Const QOP_TIME_LT = 40
  84.  Global Const QOP_TIME_GTE = 41
  85.  Global Const QOP_TIME_LTE = 42
  86.  Global Const QOP_TIME_FIRST = QOP_TIME_EQ
  87.  Global Const QOP_TIME_LAST = QOP_TIME_LTE
  88. '
  89.  Global Const QOP_YEAR_EQ = 43
  90.  Global Const QOP_YEAR_NEQ = 44
  91.  Global Const QOP_YEAR_GT = 45
  92.  Global Const QOP_YEAR_LT = 46
  93.  Global Const QOP_YEAR_GTE = 47
  94.  Global Const QOP_YEAR_LTE = 48
  95.  Global Const QOP_YEAR_FIRST = QOP_YEAR_EQ
  96.  Global Const QOP_YEAR_LAST = QOP_YEAR_LTE
  97. '
  98.  Global Const QOP_MONTH_EQ = 49
  99.  Global Const QOP_MONTH_NEQ = 50
  100.  Global Const QOP_MONTH_GT = 51
  101.  Global Const QOP_MONTH_LT = 52
  102.  Global Const QOP_MONTH_GTE = 53
  103.  Global Const QOP_MONTH_LTE = 54
  104.  Global Const QOP_MONTH_FIRST = QOP_MONTH_EQ
  105.  Global Const QOP_MONTH_LAST = QOP_MONTH_LTE
  106. '
  107.  Global Const QOP_DAY_EQ = 55
  108.  Global Const QOP_DAY_NEQ = 56
  109.  Global Const QOP_DAY_GT = 57
  110.  Global Const QOP_DAY_LT = 58
  111.  Global Const QOP_DAY_GTE = 59
  112.  Global Const QOP_DAY_LTE = 60
  113.  Global Const QOP_DAY_FIRST = QOP_DAY_EQ
  114.  Global Const QOP_DAY_LAST = QOP_DAY_LTE
  115. '
  116.  Global Const QOP_HOUR_EQ = 61
  117.  Global Const QOP_HOUR_NEQ = 62
  118.  Global Const QOP_HOUR_GT = 63
  119.  Global Const QOP_HOUR_LT = 64
  120.  Global Const QOP_HOUR_GTE = 65
  121.  Global Const QOP_HOUR_LTE = 66
  122.  Global Const QOP_HOUR_FIRST = QOP_HOUR_EQ
  123.  Global Const QOP_HOUR_LAST = QOP_HOUR_LTE
  124. '
  125.  Global Const QOP_MINUTE_EQ = 67
  126.  Global Const QOP_MINUTE_NEQ = 68
  127.  Global Const QOP_MINUTE_GT = 69
  128.  Global Const QOP_MINUTE_LT = 70
  129.  Global Const QOP_MINUTE_GTE = 71
  130.  Global Const QOP_MINUTE_LTE = 72
  131.  Global Const QOP_MINUTE_FIRST = QOP_MINUTE_EQ
  132.  Global Const QOP_MINUTE_LAST = QOP_MINUTE_LTE
  133. '
  134.  Global Const QOP_SECOND_EQ = 73
  135.  Global Const QOP_SECOND_NEQ = 74
  136.  Global Const QOP_SECOND_GT = 75
  137.  Global Const QOP_SECOND_LT = 76
  138.  Global Const QOP_SECOND_GTE = 77
  139.  Global Const QOP_SECOND_LTE = 78
  140.  Global Const QOP_SECOND_FIRST = QOP_SECOND_EQ
  141.  Global Const QOP_SECOND_LAST = QOP_SECOND_LTE
  142. '
  143.  Global Const QOP_LAST = QOP_SECOND_LAST
  144. '
  145. '
  146. '//***************************************************************************
  147. '// OPERATOR STRING TABLE.
  148. '//
  149. '// The sequence of the operators in this array is identical to the
  150. '// sequence of of the QOP_ symbols in QUERYTOK.H.  If the order of one
  151. '// is changed, the order of the other must be changed to match.
  152. '// Eventually, this table will be replaced with a string table resource
  153. '// of some kind.   See CQueryToken::OperatorToString().
  154. '//
  155. '//***************************************************************************
  156. 'This array is initialized in Init_OpName_array()
  157.  Global OpName$(0 To QOP_LAST)
  158.  
  159.  Sub Init_OpName_array ()
  160.      OpName(QOP_NOOP) = "<none>"
  161.  
  162.      'BOOL operators
  163.  
  164.      OpName(QOP_BOOL_EQ) = "is (boolean)"
  165.      OpName(QOP_BOOL_NEQ) = "is not (boolean)"
  166.  
  167.      'NUMERIC operators
  168.  
  169.      OpName(QOP_NUMERIC_EQ) = "is equal to"
  170.      OpName(QOP_NUMERIC_NEQ) = "is not equal to"
  171.      OpName(QOP_NUMERIC_GT) = "is greater than"
  172.      OpName(QOP_NUMERIC_LT) = "is less than"
  173.      OpName(QOP_NUMERIC_GTE) = "is greater than or equal to"
  174.      OpName(QOP_NUMERIC_LTE) = "is less than or equal to"
  175.  
  176.      'Case-sensitive string operators
  177.  
  178.      OpName(QOP_STR_EQ) = "is"
  179.      OpName(QOP_STR_NEQ) = "is not"
  180.      OpName(QOP_STR_GT) = "comes after"
  181.      OpName(QOP_STR_LT) = "comes before"
  182.      OpName(QOP_STR_GTE) = "is same as or comes after"
  183.      OpName(QOP_STR_LTE) = "is same as or comes before"
  184.      OpName(QOP_STR_LIKE) = "is like"
  185.      OpName(QOP_STR_NOTLIKE) = "is not like"
  186.  
  187.      'Upper-case-evaluation string operators
  188.  
  189.      OpName(QOP_UPCASE_EQ) = "is (upper case)"
  190.      OpName(QOP_UPCASE_NEQ) = "is not (upper case)"
  191.      OpName(QOP_UPCASE_GT) = "comes after (upper case)"
  192.      OpName(QOP_UPCASE_LT) = "comes before (upper case)"
  193.      OpName(QOP_UPCASE_GTE) = "is same as or comes after (upper case)"
  194.      OpName(QOP_UPCASE_LTE) = "is same as or comes before (upper case)"
  195.      OpName(QOP_UPCASE_LIKE) = "is like (upper case)"
  196.      OpName(QOP_UPCASE_NOTLIKE) = "is not like (upper case)"
  197.  
  198.      'Date-Time operators
  199.  
  200.      OpName(QOP_DATETIME_EQ) = "date/time is"
  201.      OpName(QOP_DATETIME_NEQ) = "date/time is not"
  202.      OpName(QOP_DATETIME_GT) = "date/time is after"
  203.      OpName(QOP_DATETIME_LT) = "date/time is before"
  204.      OpName(QOP_DATETIME_GTE) = "date/time is on or after"
  205.      OpName(QOP_DATETIME_LTE) = "date/time is on or before"
  206.  
  207.      'Date operators
  208.  
  209.      OpName(QOP_DATE_EQ) = "date is"
  210.      OpName(QOP_DATE_NEQ) = "date is not"
  211.      OpName(QOP_DATE_GT) = "date is after"
  212.      OpName(QOP_DATE_LT) = "date is before"
  213.      OpName(QOP_DATE_GTE) = "date is on or after"
  214.      OpName(QOP_DATE_LTE) = "date is on or before"
  215.  
  216.      'Time operators
  217.  
  218.      OpName(QOP_TIME_EQ) = "time is"
  219.      OpName(QOP_TIME_NEQ) = "time is not"
  220.      OpName(QOP_TIME_GT) = "time is after"
  221.      OpName(QOP_TIME_LT) = "time is before"
  222.      OpName(QOP_TIME_GTE) = "time is at or after"
  223.      OpName(QOP_TIME_LTE) = "time is at or before"
  224.  
  225.      'Year operators
  226.  
  227.      OpName(QOP_YEAR_EQ) = "year is"
  228.      OpName(QOP_YEAR_NEQ) = "year is not"
  229.      OpName(QOP_YEAR_GT) = "year is after"
  230.      OpName(QOP_YEAR_LT) = "year is before"
  231.      OpName(QOP_YEAR_GTE) = "year is on or after"
  232.      OpName(QOP_YEAR_LTE) = "year is on or before"
  233.  
  234.      'Month operators
  235.  
  236.      OpName(QOP_MONTH_EQ) = "month is"
  237.      OpName(QOP_MONTH_NEQ) = "month is not"
  238.      OpName(QOP_MONTH_GT) = "month is after"
  239.      OpName(QOP_MONTH_LT) = "month is before"
  240.      OpName(QOP_MONTH_GTE) = "month is on or after"
  241.      OpName(QOP_MONTH_LTE) = "month is on or before"
  242.  
  243.      'Day operators
  244.  
  245.      OpName(QOP_DAY_EQ) = "day is"
  246.      OpName(QOP_DAY_NEQ) = "day is not"
  247.      OpName(QOP_DAY_GT) = "day is after"
  248.      OpName(QOP_DAY_LT) = "day is before"
  249.      OpName(QOP_DAY_GTE) = "day is on or after"
  250.      OpName(QOP_DAY_LTE) = "day is on or before"
  251.  
  252.      'Hour operators
  253.  
  254.      OpName(QOP_HOUR_EQ) = "hour is"
  255.      OpName(QOP_HOUR_NEQ) = "hour is not"
  256.      OpName(QOP_HOUR_GT) = "hour is after"
  257.      OpName(QOP_HOUR_LT) = "hour is before"
  258.      OpName(QOP_HOUR_GTE) = "hour is at or after"
  259.      OpName(QOP_HOUR_LTE) = "hour is at or before"
  260.  
  261.      'Minute operators
  262.  
  263.      OpName(QOP_MINUTE_EQ) = "minute is"
  264.      OpName(QOP_MINUTE_NEQ) = "minute is not"
  265.      OpName(QOP_MINUTE_GT) = "minute is after"
  266.      OpName(QOP_MINUTE_LT) = "minute is before"
  267.      OpName(QOP_MINUTE_GTE) = "minute is at or after"
  268.      OpName(QOP_MINUTE_LTE) = "minute is at or before"
  269.  
  270.      'Second operators
  271.  
  272.      OpName(QOP_SECOND_EQ) = "second is"
  273.      OpName(QOP_SECOND_NEQ) = "second is not"
  274.      OpName(QOP_SECOND_GT) = "second is after"
  275.      OpName(QOP_SECOND_LT) = "second is before"
  276.      OpName(QOP_SECOND_GTE) = "second is at or after"
  277.      OpName(QOP_SECOND_LTE) = "second is at or before"
  278.  End Sub
  279.  
  280.  Sub Init_QRYCODES ()
  281.      Init_OpName_array
  282.  End Sub
  283.  
  284.