home *** CD-ROM | disk | FTP | other *** search
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ' VBDEMO.BAS
- ' ODBC Visual Basic Sample Application
- '
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ' VBDEMO consists of the following source files:
- '
- ' VBDEMO.BAS -- Constants, DLL and API declarations, and global variables
- ' used to maintain connection and statement handles.
- '
- ' GRIDCTL.BAS -- Maintains and displays a "grid control", include routines
- ' to store, retrieve, and display data. Could easily be
- ' used with another application.
- '
- ' MISCPROC.BAS -- Procedures to manage connections, and to fill "grid control"
- ' with data. Could be used with another application with
- ' some modification.
- '
- ' QUERY.FRM -- The main form, allows users to enter SQL queries and
- ' view results.
- '
- ' LOGON.FRM -- Allows user to establish a connection to a data base
- '
- ' SQLABOUT.FRM -- Displays "About VBDEMO" message box
-
- ''''''''''''''''''''
- ' GLOBAL CONSTANTS '
- ''''''''''''''''''''
-
- ''''''''''''''''
- ' Convenient Global Constants
-
- Global Const AppName = "VB Demo"
- Global Const StopIcon = 16
- Global Const QuIcon = 32
- Global Const AttIcon = 48
- Global Const InfoIcon = 64
- Global Const HourGlass = 11
- Global Const Normal = 0
- Global Const PixelScale = 3
- Global Const SolidFill = 1
- Global Const ShowModal = 1
-
- Global Const ASCII_CR = 13
- Global Const ASCII_LF = 10
- Global Const ASCII_ESC = 27
- Global Const ASCII_TAB = 9
-
- Global Const KEY_PRIOR = &H21
- Global Const KEY_NEXT = &H22
- Global Const KEY_END = &H23
- Global Const KEY_HOME = &H24
- Global Const KEY_LEFT = &H25
- Global Const KEY_UP = &H26
- Global Const KEY_RIGHT = &H27
- Global Const KEY_DOWN = &H28
- Global Const KEY_SELECT = &H29
-
- Global Const ACTIVE_TITLE_BAR = &H80000002 ' Active window caption.
- Global Const INACTIVE_TITLE_BAR = &H80000003 ' Inactive window caption.
-
- '''''''''''''''
- ' Miscellaneous Constants
-
- Global Const Inactive = 0
- Global Const Active = 1
- 'Global Const TRUE = -1
- 'Global Const False = 0
-
- Global Const SBufferLen = 256 ' Default String Buffer Length
-
- ''''''''''''''''
- ' Connection Management Constants and Data Structures
-
- Global Const MaxConnections = 16
-
- Type ConnectionInfo
- hdbc As Long ' Connection handle
- hstmt As Long ' Statement handle
- Status As Integer ' Active or Inactive
- Tag As String ' A string of the form "DataSource <number>"
- ' uniquely identifying a connection
- End Type
-
- Global Connection(1 To MaxConnections) As ConnectionInfo
- Global NumConnections As Integer
- Global henv As Long
-
-