If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > drop database with PreparedStatement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-03-07, 12:35
yaronr yaronr is offline
Registered User
 
Join Date: Jun 2007
Posts: 9
drop database with PreparedStatement

any idead why the following code doesn't work:

con = dataSource.getConnection();
ps = con.prepareStatement("DROP DATABASE DBNAME ");
rs = ps.executeQuery();
Reply With Quote
  #2 (permalink)  
Old 07-04-07, 00:59
swapnilclarion swapnilclarion is offline
Registered User
 
Join Date: May 2007
Posts: 8
Hi,

Does it give any error, if yes what type of error?
Try using ps.executeUpdate() instead of ps.executeQuery()

thanks,
Reply With Quote
  #3 (permalink)  
Old 07-04-07, 02:42
yaronr yaronr is offline
Registered User
 
Join Date: Jun 2007
Posts: 9
it works

thanks
that was the problem...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On