Sample Code Conventions
The following conventions apply throughout the sample code included in the
online help and the sample applications shipped with Oracle Objects for OLE:
· The OO4O sample programs are installed in the ORACLE_HOME\OO4O directory.
There are directories for both C++ and Visual Basic samples.
· The data tables referenced, such as EMP and DEPT, are the standard Oracle
demonstration tables. The demo user is ‘scott/tiger’. You can create the demo tables and user with the script DEMOBLD7.SQL located
in the ORACLE_HOME\OO4O directory. You can drop these tables and views with
the script DEMODRP7.SQL.
· You can create the stored procedures referenced with the script ORAEXAMP.SQL
located in the ORACLE_HOME\OO4O directory. Additional scripts, such as
MULTICUR.SQL and EMPCUR.SQL, are provided to set up other samples programs.
· The file ORACONST.TXT contains constant values such as True and False (defined
as the corresponding values in Visual Basic), and other constants used for
options flags and property values.
· The user ‘scott’ with password ‘tiger’ (‘scott/tiger’) is used for the Connect property. If you want to use a different
user/password, you must set up this user with the schema (demo tables, etc.)that has been
set up for scott/tiger.
· The network alias ‘ExampleDb’ is used for the DatabaseName property. Refer to Oracle networking
documentation for assistance in setting up the database alias and the tnsnames.ora file.
· You can make changes to names of databases and names given to controls on a
form, but you must be consistent through out the project. For example, you can
rename the Oracle Data Control to ‘MyDataControl’ but be aware that all instances of ‘ORADataControl’ must be changed to ‘MyDataControl’. You can also set up a network alias different than ‘ExampleDb’ but you must update all properties and code to reflect that change. In many
of the examples, you can access a local database using ‘‘‘‘ (a null string) for the network alias.