Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

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]

Where
Specifies the following
username
username to log onto the database
password
password for the username
connect_string
database connection string
package
package name
stored_procedure
stored procedure name (optional)
For example:

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

Option:

-o
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:

Extension
File Generated
.cls
VB class file
.bas
VB file
.asp
ASP or VB script file
.vbs
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.

File Generation

What is specified
This command generates This type file
package name only (no procedure name) plus:



filename with no file extension generates
filename.cls

OO4OCodeWiz -o empfile scott/tiger@exampleDB employee

empfile.cls
no filename or extension: generates
packagename.cls

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

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



package name and procedure name plus:



filename with no file extension generates
filename.bas

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

empfile.bas
no filename or extension generates
packagename.bas

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

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


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 follows

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 follows

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.


 
Oracle
Copyright © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback