Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Processing None-SQL query via JDBC

 
Amit Kumar Das
Greenhorn
Posts: 2
Eclipse IDE Oracle Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I was just building my own query processor. I found a problem in dealing with vendor-specific commands.
for Ex: if i want to run "DESC <Table Name>", It result in an Exception, which is quite obvious as it is not an SQL command.
Now if I want to access Table Metadata, I need to develop my own method.
What could be the possible ways for doing that??
 
Jan Cumps
Bartender
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
desc <tablename> is not a database command. It is an sql*plus command. The database does not understand it (as you have noticed by the exceprion).
java.sql.ResultSet.getMetaData() can help you.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic