Oracle® Objects for OLE Developer's Guide 11g Release 1 (11.1) Part Number B28378-01 |
|
|
View PDF |
This appendix includes the following:
The following are code for Oracle data types.
Table A-1 Oracle Data Type Codes
Oracle Data Type | Codes |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These codes are also listed in the oraconst.txt
file located in the ORACLE_BASE\ORACLE_HOME
\oo4o
directory.
Occasionally other schemas are required to run examples. These schemas are listed in the following sections.
This section presents OraMetaData schema definitions.
CREATE TYPE ORAMD_ADDRESS AS OBJECT ( no NUMBER, street VARCHAR(60), state CHAR(2), zip CHAR(10), MEMBER PROCEDURE ChangeStreetName(newstreet IN VARCHAR2) );
The following schema objects are used in the OraLOB and BFILE
examples. Run the SQL script ORAEXAMP.SQL
on your database to set up the schema.
CREATE TABLE part ( part_id NUMBER, part_name VARCHAR2(20), part_image BLOB, part_desc CLOB, part_collateral BFILE ); Create Directory NewDirectoryName as 'C:\valid\path'
The following schema objects are used in the OraObject
and OraRef
examples. Data for the following tables can be inserted with the ORAEXAMP.SQL
script that is provided with the OO4O installation.
CREATE TYPE address AS OBJECT ( street VARCHAR2(200), city VARCHAR2(200), state CHAR(2), zip VARCHAR2(20) ); CREATE TYPE person as OBJECT( name VARCHAR2(20), age NUMBER, addr ADDRESS); CREATE TABLE person_tab of PERSON; CREATE TABLE customers( account NUMBER, aperson REF PERSON);
The following schema is used in examples of OraCollection
methods
CREATE TYPE ENAMELIST AS VARRAY(20) OF VARCHAR2(30); CREATE TABLE department ( dept_id NUMBER(2), name VARCHAR2(15), ENAMES ENAMELIST); DROP TYPE COURSE; CREATE TYPE Course AS OBJECT ( course_no NUMBER(4), title VARCHAR2(35), credits NUMBER(1)); CREATE TYPE CourseList AS TABLE OF Course; CREATE TABLE division ( name VARCHAR2(20), director VARCHAR2(20), office VARCHAR2(20), courses CourseList) NESTED TABLE courses STORE AS courses_tab;