Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00904 invalid identifier calling IM Object Method

561506Feb 22 2007
Hello,

I try to retrieve the content of an InterMedia audio Object using the getContent() method and JDBC.
Here is the sample code:

rs=(OracleResultSet)stat.executeQuery("select <alias>.<column>.getContent() from ... <schema>.<table> <alias>);

I know that I could use the oracle.ord.im.OrdAudio Object but I do not want to use it if possible. Executing the sample code throws the following:

CODE:
stat = (OracleStatement) conn.createStatement();

rs=(OracleResultSet)stat.executeQuery("select t.AUDIO.getContent() from lessner.mmi_test t where mmid=20");

EXCEPTION:
ava.sql.SQLException: ORA-00904: "LESSNER"."MMI_TEST"."AUDIO": invalid identifier

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:622)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:111)
at oracle.jdbc.driver.T4CStatement.execute_for_describe(T4CStatement.java:350)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:895)
at oracle.jdbc.driver.T4CStatement.execute_maybe_describe(T4CStatement.java:382)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:985)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1124)

The question is:
Is it possible to call a method of a UDT like Audio, Video, etc. without the corresponding java class on the application side and without the use of oracle.sql.SRUCT?

In the SQL Developer of Oracle I could make a select like:

SELECT t.mmid,
t.audio.getContent(),
t.audio.getSource(),
t.audio.getSampleSize(),
t.audio.getContentLength(),
t.audio.getAudioDuration(),
t.audio.getCompressionType(),
t.audio.getEncoding()
from lessner.mmi_test t;


Thanks
Tim
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2007
Added on Feb 22 2007
0 comments
610 views