• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Strange sql problem in jdbc

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Hi I have one table DataSheet in oracle 9i with two column
NETOBJECTID and EVENT_DATE_TIME.

What a strange problem is coming,

ResultSet rs = statement.executeQuery("SELECT NETOBJECTID FROM DataSheet");

query is working fine through JDBC api, and


ResultSet rs = statement.executeQuery("SELECT NETOBJECTID,EVENT_DATE_TIME FROM DataSheet");

query is not working throught JDBC api, while this is working fine directly in oracle sql client .

Is EVENT_DATE_TIME i any keyword in java

When we include it into query this gives the following exception

java.sql.SQLException: ORA-03115: unsupported network datatype or representation
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.v8Odscrarr.receive(v8Odscrarr.java:191)
at oracle.jdbc.ttc7.TTC7Protocol.describe(TTC7Protocol.java:586)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:647)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)*********QUERY=SELECT EVENT_DATE_TIME,NETOBJECTID,ALARM_ID,SEVERITY,CATEGORY,SOURCE,GROUP_NAME,ADDITIONAL_INFO,BACKEUPOBJECT,BACKEDUPSTATUS,CAUSE,
REPAIRACTION_PROPOSED,SPECIFIC_PROBLEMS,ALARM_STATE,ASSIGNEDTO,
OPERATOR_NAME,THRESHOLD_INFO,TREND_INDICATION,ESCALATED_FROM,ESCALATED_TO,STATECHANGEDEF FROM Alarm_Table WHERE Threshold_Info is not null
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:538)
at com.sisl.snms.server.util.db.DBUtil.getData(DBUtil.java:485)
at com.sisl.snms.server.util.db.DBUtil.getColumnData(DBUtil.java:824)
at com.sisl.snms.server.util.db.DBManager.getTcas(DBManager.java:1986)
at com.sisl.db.Demo.main(Demo.java:146)


Regards -

Vikas Kumar Sahu


[ August 29, 2005: Message edited by: Bear Bibeault ]

[edited to add line break]
[ August 29, 2005: Message edited by: Jeanne Boyarsky ]
 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is EVENT_DATE_TIME i any keyword in java



No.

What datatype is EVENT_DATE_TIME ?
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Same Name
as per ur code i think there are data type problem i thing u have to covert that data type in java.sql.Date or java.sql.Timestamp datatype
and then u can do ur work
byeeeeeeeeeeeee
 
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic