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

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

php require help needed
Ok i tried to use the search funtion but the word require is everywhere.

i'm really new to cr

How do I get the row number from from an sql table query
Hi all

I have a table that I query and it returns a number of rows.
mysql_num_rows($query)

php code generators
All

Whilst enjoying learning a new language i have come accross a number of free code generat

Parse error: syntax error, unexpected T_ELSEIF in /home/......html/item.php on l
I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site

Include a php
Hello,

I'm trying to include a function that shows the recent searches.
Example I have <

Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi

storing results of a function - previous result overwritten with new result
I have created a function to validate input.

function validate_dimension($value,$name) {
<

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

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