0 Replies Latest reply on Feb 22, 2007 9:27 AM by 561506

    ORA-00904 invalid identifier calling IM Object Method

    561506
      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