Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- btBtnAdauga.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/student", "user", "pass");
- Statement stmt = connection.createStatement();
- stmt.executeUpdate(
- "INSERT INTO colocviu ('nume', 'prenume', 'nationalitate', 'tara') VALUES " +
- "(" + tf0 + ", " + tf1 + ", " + bG.getSelection().getActionCommand() + ", " + dataComboTara.getSelectedItem().toString() + ")");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement