The moose likes JDBC and the fly likes Can I use JDBC to execute database command? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Can I use JDBC to execute database command?" Watch "Can I use JDBC to execute database command?" New topic
Author

Can I use JDBC to execute database command?

sam cheung
Greenhorn

Joined: Nov 07, 2002
Posts: 5
Hi,

Can someone please tell me if I use JDBC to execute database (non-query) command? For example, in MySQL, it has command like 'SHOW MASTER STATUS', Can I execute that thru JDBC? If yes, can you please point me to an example?

Thank you for any help.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26168
    
  66

Sam,
JDBC is used to execute queries (or DDL instructions.) You could use Runtime.exec() to call a shell script containing the database instruction.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I use JDBC to execute database command?
 
Similar Threads
DB2 JDBC connection
creating a new user profile dynamically for mysql?
Accessing jar file in classpath
calling servlet and PHP from oracle
executing an sql through java