Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    9

    Unanswered: 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();

  2. #2
    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,

  3. #3
    Join Date
    Jun 2007
    Posts
    9

    it works

    thanks
    that was the problem...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •