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_base\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/password is scott/tiger. You can create the demo tables and user with the script demobld7.sql located in the oracle_base\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_base\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 the Oracle Net8 Administrator’s Guide for assistance in setting up the network service (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.
Contents