Oracle Objects for OLE
Release 9.0.1

Part Number A90173-01


Book List


Master Index


Using the OO4O Code Wizard

The OO4O Code Wizard can be used as a command line utility or as a Visual Basic Add-in.

OO4O Code Wizard 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]

Specifies the following
username to log onto the database
password for the username
database connection string
package name
stored procedure name (optional)

For example:

OO4OCodeWiz -o empfile.asp scott/tiger@exampleDB employee.example


specifies the output file name (optional)

Files Generated

The code wizard uses the information specified on the command line to determine which type of output file to generate.

If a filename and one of the permitted file extensions are specified, they are used. In the example above, an ASP file is generated in the
empfile.asp output. The user may specify the following extensions:

VB class file
VB file
ASP or VB script file
ASP or VB script file

If no file extension is specified, the following rules indicate what type of file is generated depending on other command line specifications. Examples are provided in the table following.

Package names without a stored procedure name generate a
.cls file.

Package names with procedure names generate a
.bas file.

What is specified
This command generates

This type file
package name only (no procedure name) plus:

filename with no file extension generates

OO4OCodeWiz -o empfile scott/tiger@exampleDB employee

no filename or extension: generates

OO4OCodeWiz scott/tiger@exampleDB employee
filename with file extension generates

OO4OCodeWiz -o empfile.asp scott/tiger@exampleDB employee

package name and procedure name plus:

filename with no file extension generates

OO4OCodeWiz -o empfile scott/tiger@exampleDB employee.example

no filename or extension generates

OO4OCodeWiz scott/tiger@exampleDB employee.example
filename with file extension generates

OO4OCodeWiz -o empfile.asp scott/tiger@exampleDB employee.example

OO4O Code Wizard Visual Basic Wizard Add-in

  1. Launch the OO4O Code wizard by selecting Oracle Code Wizard for Stored Procedures in the Add-Ins pull-down menu of Microsoft Visual Basic.

The Connect To Oracle Database dialog box appears:


Text description of the illustration connect.gif

2. 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.

3. Click OK.

The wizard displays the Oracle packages and stored procedures available to the user in a tree control.


Text description of the illustration wizproc.gif

4. Select one of the stored procedures or packages displayed.

5. Enter an output filename or click the Browse.. button to navigate to a different directory in which to place the file.

6. 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 generates a VB file (*.bas), but allows you to specify your own file extension.

7. Click OK.

A dialog box appears informing the user that a new OO4O file has been created.

8. Click Yes to create another file or click No to return to Visual Basic.

Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.


Book List