Initial Revision
[ohcount] / test / expected_dir / frx1.frx / visualbasic / comment
1 '---------------------------------------------------------------------------
2 '
3 ' Licensed Materials - Property of IBM
4 ' Governed under the terms of the IBM Public License
5 '
6 ' (C) COPYRIGHT International Business Machines Corp. 2002
7 ' All Rights Reserved.
8 '
9 ' US Government Users Restricted Rights - Use, duplication or
10 ' disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
11 '---------------------------------------------------------------------------
12 '
13 ' SOURCE FILE NAME: Demo.frm
14 '
15 ' SAMPLE: Visual Basic Demo with user interface for the sample modules
16 '
17 ' MODULES USED:
18 '         cli_Info.bas
19 '         cliExeSQL.bas
20 '         dbCommit.bas
21 '         dbConn.bas
22 '         dbInfo.bas
23 '         dtHier.bas
24 '         dtLob.bas
25 '         spCall.bas
26 '         udfUse.bas
27 '         Util.bas
28 '
29 ' For more information about samples, refer to the README file.
30 '
31 ' For more information on the SQL language, refer to the SQL Reference.
32 '
33 ' For the latest information on programming, compiling, and running DB2
34 ' applications, refer to the DB2 application development website at
35 '     http://www.software.ibm.com/data/db2/udb/ad
36 '---------------------------------------------------------------------------
37 'This procedure calls ConnectOLEDB() in the module dbConn to get
38 'a connection object.
39 'define the error handler
40 '  On Error GoTo cmdConnectOLEDB_Error
41 'connect to database
42 'generate a message of success
43 'config status of the buttons
44 'show instructions
45 'generate an error message
46 'show instructions
47 'This procedure calls ConnectODBC() in the module dbConn to get
48 'a connection object.
49 'define the error handler
50 'connect to database
51 'generate a message of success
52 'config status of the buttons
53 'show instructions
54 'generate an error message
55 'show instructions
56 'This procedure calls ConnectDataShape() in the module dbConn to
57 'get a connection object.
58 'define the error handler
59 'connect to database
60 'generate a message of success
61 'config status of the buttons
62 'show instructions
63 'generate an error message
64 'show instructions
65 'This procedure enables buttons after a connection is created.
66 'This procedure shows the instruction message after creating a connection.
67 'This procedure calls Disconnect() in the module dbConn to close
68 'a connection object.
69 'define the error handler
70 'clear displays and release data sources
71 'disconnect from database
72 'configure status of the buttons
73 'show instructions
74 'generate an error message
75 'show instructions
76 'This procedure calls ConnectInfo in dbInfo to obtain information
77 'and displays the connection information on a message box.
78 'This procedure calls VersionInfo in apInfo to obtain information
79 'and displays the version information on a message box.
80 'This procedure close the main screen and quit the program.
81 'check if it is necessary to commit any changes
82 'release all the memory allocated
83 'exit
84 'This procedure calls CreateSample in Util to re-create the
85 'sample database.
86 'define the error handler
87 'create the sample database
88 'show instructions
89 'generate an error message
90 'show instructions
91 'This procedure calls ExecuteSQLConnect in apExeSQL to execute a
92 'SQL statement.
93 'define the error handler
94 'display results and/or message
95 'generate an error message and exit
96 'This procedure calls ExecuteSQLCommand in apExeSQL to execute a
97 'SQL statement.
98 'define the error handler
99 'display results and/or message
100 'generate an error message and exit
101 'This procedure calls ExecuteSQLRecordset in apExeSQL to execute a
102 'SQL statement.
103 'define the error handler
104 'display results and/or message
105 'generate an error message and exit
106 'This procedure displays instructions for exiting recursive errors while
107 'editing on the DataGird
108 'This procedure generates a sample SQL statement
109 'This procedure clears the results when choosing a predefined SQL
110 'statement sample
111 'This procedure toggles the autocommit mode on/off by calling
112 'procedures in the module dbCommit.
113 'define the error handler
114 'turn the autocommit mode OFF
115 'ask if the user wants to commit all the previous changes
116 'before turning the autocommit mode ON
117 'generate an error message and exit
118 'This procedure commits any previous changes by calling
119 'procedures in the module dbCommit.
120 'define the error handler
121 'commit the changes and start a new transaction
122 'generate an error message and exit
123 'This procedure rollbacks any previous changes by calling
124 'procedures in the module dbCommit.
125 'define the error handler
126 'rollback the changes and start a new transaction
127 'generate an error message and exit
128 'This is a helper procedure which refreshes the data displayed
129 'on the DataGridSQL.
130 'This procedure calls ExecuteHSQL() in the module dtHier to
131 'obtain a hierarchical recordset object.
132 'display in Grids
133 'display text information message
134 'This procedure calls GetLOB in dtLob to get an ADO Control for LOBs.
135 'define the error handler
136 'get an ADO Control for the LOBs
137 'set display objects
138 'enable buttons
139 'generate an error message and exit
140 'This procedure enables the display of employee pictures.
141 'This procedure enables the display of employee resumes.
142 'This is a helper procedure for Adodc caption display.
143 'This procedure checks and enables buttons for available stored
144 'procedures
145 'get information for all available procedures
146 'reset all selections
147 'enable buttons for available stored procedures
148 'enable Call button if any stored procedure available
149 'release objects
150 'This procedure clears the screen in switching the stored procedures
151 'This procedure calls various subroutines and subroutines in the
152 'module spCall to execute corresponding stored procedures and
153 'displays the results onto the screen.
154 'define the error handler
155 'check for the selected stored procedure by iteration
156 'clear the screen for result display
157 'call the corresponding selected stored procedure
158 'generate a message of success
159 'generate an error message and exit
160 'This procedure shows the second result set returned by calling
161 'the stored procedurd TWO_RESULT_SETS
162 'show next recordset
163 'This procedure calls CallSP_IN_PARAMS in the module spCall and
164 'compares information obtained from the same table before and
165 'after calling the stored procedure
166 'initialize variables
167 'get information before calling the stored procedure
168 'call the stored procedure
169 'get information after calling the stored procedure
170 'This procedure calls CallSP_INOUT_PARAM in the module spCall by
171 'using a parameter got form calling CallSP_OUT_PARAM and outputs
172 'a result message
173 'define variable
174 'get a parameter from OUT_PARAM
175 'call the stored procedure with the parameter
176 'This procedure calls CallSP_ALL_DATA_TYPES in the module spCall
177 'and displays the results
178 'initialize object and settings
179 'call the stored procedure
180 'output the results
181 'reset and release the object
182 'This procedure calls CallSP_DBINFO_EXAMPLE in the module spCall
183 'with a JOB as an IN parameter and displays the results obtained
184 'from the stored procedure containing information of the table and
185 'the database.
186 'define objects and variables
187 'call the stored procedure
188 'display the results
189 'This procedure calls various subroutines in the module udUse to
190 'execute corresponding user defined functions and displays the
191 'results onto the screen.
192 'define the error handler
193 'clear the screen for result display
194 'call the specific UDF procedure
195 'generate a message of success
196 'generate an error message and exit
197 'This procedure defines initial parameters.
198 'ask the user for displaying the instructions or not
199 'This procedure shows instructions at the begining of the program.
200 'This procedure maintains screen integrity for the Main Tabs.
201 'clear the the Tab screen before switching
202 'This procedure shows instructions for the Main Tabs.
203 'show instructions