Using the OO4O Code Wizard
OO4O Code Wizard (oo4ocodewiz.exe) Command Line Utility
OO4OCodeWiz.exe is a command line utility that generates a Visual Basic
class, a Visual Basic file, or an Active Server Page/VB Script file from
existing PL/SQL or Java stored procedures, as well as packages, within
an Oracle database. The utility is used in the following manner:
OO4OCodeWiz [-o output_file] username/password@connect_string package[.stored_procedure]
For example,
OO4OCodeWiz -o employee.asp scott/tiger@exampleDB
employee.sp_example
Options:
-o
output_file
Specify the output file name (optional)
username
Specify the username to log onto the database
password
Specify the password for the username
connect_string
Specify the database connection string
package
Specify the package name
stored_procedure Specify the stored
procedure name (optional)
The code wizard uses the output file extension to
determine the type of file to generate. In the original example, an ASP file
would be generated in the employee.asp output. The extensions the
user
may specify are below:
*.cls
VB class file
*.bas
VB file
*.asp
ASP or VBscript file
*.vbs
ASP or VBscript file
If none of the above extensions are indicated in the
output file parameter and the input is an entire package, the generated file will
default to a VB class. If no output file is indicated, the utility will
generate an output file using the name of the package for the output file name.
If none of the above extensions are indicated in the output file parameter and
the input is a stored procedure, the generated file will
default to a VB file. In this case, if no output file is indicated,
the utility will generate an output file using the name of the package
and the stored procedure for the output file name. Using the example above, the
default output file would be employee_sp_example.bas.
OO4O Code Wizard Visual Basic Wizard Add-in
-
Launch the OO4O Code wizard by selecting Oracle
Code Wizard for Stored Procedures in the Add-Ins pull-down menu Microsoft
Visual Basic.
-
The Connect To Oracle Database dialog box appears:
-
Enter the user name and password to connect to the
database. A connect string is required if the database is not installed on
the user’s local computer.
-
Click OK.
-
The wizard displays the Oracle packages and stored
procedures available to the user in a tree control. Select one of the stored
procedures or packages displayed.
-
Enter an output
filename or click the Browse… button to navigate to a different directory in which
to place the file.
-
Choose the file type from the Component Type list
box. There are three choices: a VB class module (*.cls), a VB file
(*.bas), or other. The "other" option will generate a VB
file (*.bas), but allow you to specify your own file extension.
-
Click OK. A dialog appears informing the user that
a new OO4O file has been created.
-
Click Yes to create another file or click No to
return to Visual Basic.