aspose file tools*
The moose likes JDBC and the fly likes Processing None-SQL query via JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Processing None-SQL query via JDBC" Watch "Processing None-SQL query via JDBC" New topic
Author

Processing None-SQL query via JDBC

Amit Kumar Das
Greenhorn

Joined: Feb 26, 2011
Posts: 2



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??


Amit Kumar Das, ASE @ TCS Kolkata, India
http://www.linkedin.com/in/akumardas
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2477
    
    7

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.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Processing None-SQL query via JDBC
 
Similar Threads
from two columns get one based on the value of another column passed in hibernate
Seeking help on a complex SQL I reckon, wish get a simple one from answer
How to use Bind Variable with FROM and UPDATE clauses in PreparedStatement???
SimpleJdbcDaoSupport
export query from table column to text file