I have error for code:
String sql = "CREATE USER ken IDENTIFIED BY 11;"; try { Class.forName("oracle.jdbc.OracleDriver"); con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "system", "kenilyas"); System.out.println("1111111111111"); System.out.println("222222"); pst = con.prepareStatement(sql); System.out.println("333333"); try { System.out.println("333333"); pst.execute(); System.out.println("creating"); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); }
The problem is ;
sql = "CREATE USER ken IDENTIFIED BY 11;";
Remove the ;
from above string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With