Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

execute query

 
mohamed mustaq
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to execute the
desc [tablename] ,
show user command in java
executeQuery is not working for the above commands.
thanks..
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use DatabaseMetaData.getColumns to get columns info.
[ February 12, 2006: Message edited by: Satou kurinosuke ]
 
mohamed mustaq
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks but i know how to get the column name and column type using databasemetadata.
but i am developing editor in java to run all sql queries like select,delete,insert and all.
its all working fine for me,but if i give the command like dec tablename ,
show user,rollback/
it wont work.
i think u understand what i am asking.
thanks ..
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
executeQuery cannot be used for such commands. It is used for queries only.
I don't think there is a simple way to process the user commands.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic