| Author |
execute query
|
mohamed mustaq
Greenhorn
Joined: Dec 19, 2005
Posts: 21
|
|
how to execute the desc [tablename] , show user command in java executeQuery is not working for the above commands. thanks..
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
you can use DatabaseMetaData.getColumns to get columns info. [ February 12, 2006: Message edited by: Satou kurinosuke ]
|
[My Blog]
All roads lead to JavaRanch
|
 |
mohamed mustaq
Greenhorn
Joined: Dec 19, 2005
Posts: 21
|
|
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
Joined: Nov 24, 2005
Posts: 14685
|
|
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.
|
 |
 |
|
|
subject: execute query
|
|
|