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,
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

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

COOIS - Saving Object Overview WIP Status layouts
COOIS - Would like to be able to save the layout of an Object Overview - WIP Status report. There i

building a function with multiple outputs
I want to build a function that has multiple outputs.

I know but am not to sure how I should

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.

Users and Groups with PHP Classes
Hi,

I have setup what I hope to be a good working User class. Now I want to introduce group m

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

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