Java Reference
In-Depth Information
con = DriverManager.getConnection(url);
stmt = con.createStatement();
stmt.execute("CREATE USER " + username + " WITH PASSWORD " +
password);
}
catch(SQLException e) {
System.err.println(e.getMessage());
}
finally {
try
{
if (con != null) {
con.close();
}
if (stmt !=null) {
stmt.close();
}
}
catch (Exception ex) { // ignore }
}
}
public void deleteUser(String username){
Connection con;
Statement stmt;
try
{
con = DriverManager.getConnection(url);
stmt = con.createStatement();
stmt.execute(SQL_GroupDelete + username);
}
catch(SQLException e) {
System.err.println(e.getMessage());
}
finally {
try
{
if (con != null) {
con.close();
}
if (stmt !=null) {
stmt.close();
}
Search WWH ::




Custom Search