home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / odbcsdk / samples / vbdemo / vbdemo.bas < prev    next >
Encoding:
BASIC Source File  |  1994-12-07  |  2.8 KB  |  91 lines

  1. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  2. '                                VBDEMO.BAS
  3. '                 ODBC Visual Basic Sample Application
  4. '
  5. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  6.  
  7. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  8. ' VBDEMO consists of the following source files:
  9. '
  10. ' VBDEMO.BAS    -- Constants, DLL and API declarations, and global variables
  11. '                 used to maintain connection and statement handles.
  12. '
  13. ' GRIDCTL.BAS  -- Maintains and displays a "grid control", include routines
  14. '                 to store, retrieve, and display data.  Could easily be
  15. '                 used with another application.
  16. '
  17. ' MISCPROC.BAS -- Procedures to manage connections, and to fill "grid control"
  18. '                 with data.  Could be used with another application with
  19. '                 some modification.
  20. '
  21. ' QUERY.FRM    -- The main form, allows users to enter SQL queries and
  22. '                 view results.
  23. '
  24. ' LOGON.FRM    -- Allows user to establish a connection to a data base
  25. '
  26. ' SQLABOUT.FRM -- Displays "About VBDEMO" message box
  27.  
  28. ''''''''''''''''''''
  29. ' GLOBAL CONSTANTS '
  30. ''''''''''''''''''''
  31.  
  32. ''''''''''''''''
  33. ' Convenient Global Constants
  34.  
  35. Global Const AppName = "VB Demo"
  36. Global Const StopIcon = 16
  37. Global Const QuIcon = 32
  38. Global Const AttIcon = 48
  39. Global Const InfoIcon = 64
  40. Global Const HourGlass = 11
  41. Global Const Normal = 0
  42. Global Const PixelScale = 3
  43. Global Const SolidFill = 1
  44. Global Const ShowModal = 1
  45.  
  46. Global Const ASCII_CR = 13
  47. Global Const ASCII_LF = 10
  48. Global Const ASCII_ESC = 27
  49. Global Const ASCII_TAB = 9
  50.  
  51. Global Const KEY_PRIOR = &H21
  52. Global Const KEY_NEXT = &H22
  53. Global Const KEY_END = &H23
  54. Global Const KEY_HOME = &H24
  55. Global Const KEY_LEFT = &H25
  56. Global Const KEY_UP = &H26
  57. Global Const KEY_RIGHT = &H27
  58. Global Const KEY_DOWN = &H28
  59. Global Const KEY_SELECT = &H29
  60.  
  61. Global Const ACTIVE_TITLE_BAR = &H80000002      ' Active window caption.
  62. Global Const INACTIVE_TITLE_BAR = &H80000003    ' Inactive window caption.
  63.  
  64. '''''''''''''''
  65. ' Miscellaneous Constants
  66.  
  67. Global Const Inactive = 0
  68. Global Const Active = 1
  69. 'Global Const TRUE = -1
  70. 'Global Const False = 0
  71.  
  72. Global Const SBufferLen = 256            ' Default String Buffer Length
  73.  
  74. ''''''''''''''''
  75. ' Connection Management Constants and Data Structures
  76.  
  77. Global Const MaxConnections = 16
  78.  
  79. Type ConnectionInfo
  80.   hdbc As Long                        ' Connection handle
  81.   hstmt As Long                       ' Statement handle
  82.   Status As Integer                   ' Active or Inactive
  83.   Tag As String                       ' A string of the form "DataSource <number>"
  84.                       ' uniquely identifying a connection
  85. End Type
  86.                        
  87. Global Connection(1 To MaxConnections) As ConnectionInfo
  88. Global NumConnections As Integer
  89. Global henv As Long
  90.  
  91.