The Parameters Project
Now that you understand Parameter objects, this section will walk you though a project that allows you to view all available properties and attributes of any given stored procedure.
Begin by creating a form that looks like that of the one shown in Figure 7-1.

Figure 7-1. The Parameters Project in design mode
Now set the values of the controls as listed in Table 7-5.
Table 7-5. The Parameters Project Example Control Settings
|
Control |
Property |
Value |
|---|---|---|
|
Command Button |
Name |
cmdGo |
|
Caption |
"&Go" | |
|
Default |
-1 'True | |
|
Command Button |
Name |
CmdClose |
|
Caption |
"&Close" | |
|
Cancel |
-1 'True | |
|
Text Box |
Name |
TxtConnectionString |
|
MultiLine |
-1 'True | |
|
Text |
A valid connection string | |
|
Text Box |
Name |
TxtCommandString |
|
Text |
A valid stored procedure name | |
|
Check Box |
Name |
chkSigned |
|
Alignment |
1 'Right Justify | |
|
Caption |
"Accepts Signed Values:" | |
|
Check Box |
Name |
chkNull |
|
Alignment |
1 'Right Justify | |
|
Caption |
"Accepts Null Values:" | |
|
Check Box |
Name |
chkLong |
|
Alignment |
1 'Right Justify | |
|
Caption |
"Accepts Long Values:" | |
|
Combo Box |
Name |
CboDirection |
|
Enabled |
0 'False | |
|
List Box |
Name |
lstParameters |
|
Text Box |
Name |
TxtType |
|
Enabled |
0 'False | |
|
Text Box |
Name |
TxtSize |
|
Enabled |
0 'False | |
|
Text Box |
Name |
TxtPrecision |
|
Enabled |
0 'False | |
|
Text Box |
Name |
TxtNumericScale |
|
Enabled |
0 'False | |
|
Label |
Caption |
"Connection String:" |
|
Label |
Caption |
"Stored Procedure:" |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access