2 Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
3 Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
4 Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
5 Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
6 Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
8 BorderStyle = 1 'Fixed Single
18 StartUpPosition = 3 'Windows Default
19 Attribute VB_Name = "frmMain"
20 Attribute VB_GlobalNameSpace = False
21 Attribute VB_Creatable = False
22 Attribute VB_PredeclaredId = True
23 Attribute VB_Exposed = False
24 '---------------------------------------------------------------------------
26 ' SOURCE FILE NAME: Demo.frm
28 ' SAMPLE: Visual Basic Demo with user interface for the sample modules
30 ' For more information about samples, refer to the README file.
32 '---------------------------------------------------------------------------
36 Private con As ADODB.Connection
37 Private rst As ADODB.Recordset
38 Private strMsgText As String
39 Private wShowInstructions As Integer
41 'This procedure calls ConnectOLEDB() in the module dbConn to get
43 Private Sub cmdConnectOLEDB_Click()
44 'define the error handler
45 ' On Error GoTo cmdConnectOLEDB_Error
48 Set con = ConnectOLEDB()
50 'generate a message of success
51 sbrStatus.Panels(1).Text = "Connect to sample database succeeded!"
53 'config status of the buttons
57 If wShowInstructions = vbYes Then
58 ShowConnectionInstruction