Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying Oracle Data in a JTable

 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been struggling for the past three days with this task. It seems like it should be a standard thing to do, but I find examples hard to come by.
I want to display/edit/create information using a JTable where Oracle is the data source. Been trying to use the JDBCAdapter class that ships with Java, but it gives some errors I can't track down when trying to perform the update (I can display the data just fine):
Exception occurred during event dispatching:
java.lang.NullPointerException
at oracle.jdbc.driver.OracleResultSetMetaData.getValidColumnIndex(OracleResultSetMetaData.java:106)
at Oracle.jdbc.driver.OracleResultSetMetaData.getColumnType(OracleResultSetMetaData.java:305)
at JDBCAdapter.getColumnClass(JDBCAdapter.java:137)...
Does anyone know of good resources/examples to accomplish this.
Any help is appreciated.
Michael
 
Shekhar Sahay
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael
Are you trying to edit and insert data from the JTable? I have a working code, but here I just view the data. Let me know if this is what you are looking for and I'll email it to you.
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Shekhar,
I'd really appreciate that. Eventually I'll have to update/insert, but I'll take it one step at a time. Thank you.
My email is mhildner@afweb.com
But if anyone knows of some working code that will allow update/insert with JTable and Oracle, I could use it - it's driving me crazy trying to figure it out.
[This message has been edited by Michael Hildner (edited November 07, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic