Problem Dereferencing


Posted on 16th Feb 2014 07:03 pm by admin

With these types and tables:

CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,
Did you know?Explore Trending and Topic pages for more stories like this.
LAST_NAME VARCHAR(40),
FIRST_NAME VARCHAR(40),
PHONE char(10)
);

CREATE TABLE MANAGERS OF MANAGER OBJECT IDENTIFIER IS SYSTEM GENERATED;

CREATE TABLE STORES (
STORE_NO INTEGER,
LOCATION ADDRESS,
COF_TYPES COF_ARRAY,
MGR REF MANAGER SCOPE IS MANAGERS
);

and this code fragment from the JDBC Tutorial

ResultSet rs = stmt.executeQuery("SELECT * FROM STORES");
Ref managerRef = rs.getRef("MGR");
PreparedStatement pstmt = con.prepareStatement(
"SELECT MANAGER FROM MANAGERS WHERE OID = ?"
);
pstmt.setRef(1, managerRef);
ResultSet rs2 = pstmt.executeQuery();

I get ORA-00904: "OID": invalid identifier.

I think I need to use REF somehow instead of OID but I can't make it work.
"SELECT MANAGER FROM MANAGERS WHERE REF(MANAGER) = ?" results in ORA-00904: "MANAGER": invalid identifier
No comments posted yet

Your Answer:

Login to answer
144 Like 28 Dislike
Previous forums Next forums
Other forums

disable all input buttons
Hello Friends,

suppose i do have a file ( file.php ) has a submit button

Code: [Sele

SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

How to restrict the display of report variants
Hello All,

I want t know how to restrict the display of report variants.
I mean, whe

Members Only
Hi all, for my website i have a members area only which on members can veiw, but at the moment anyon

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The

InternetOpenUrl() Invalid cert
Hi all,

Does anyone know how to prevent calls to InternetOpenUrl() from failing with erro

Revoking alter any table from a schema
Hi All,

i am working in Oracle 10g.
my requirement is to revoke all kind of DDL oper

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash