Nasty
New Member
- Feb 26, 2012
- 23
- 2
Well this is my database:
And this Java code:
Each time you give to "High" in the table field "code" generated a number: 1
When will the second time, it detects that there is a 1 and place a 2. Bone in order,
in each "insert" generated a number more ...
And this Java code:
-
You must be registered for see linksbtnAlta = newYou must be registered for see links("Alta");
- btnAlta.addActionListener(new
You must be registered for see links() {
- public void actionPerformed(
You must be registered for see linksarg0) {
- labelResultado.setText("");
- try {
-
You must be registered for see linksconexion=You must be registered for see links.getConnection("jdbc:mysql://localhost/bd1","root" ,"");
-
You must be registered for see linkscomando=conexion.createStatement();
- comando.executeUpdate("insert into articulos(descripcion,precio) values ('"+tf1.getText()+"',"+tf2.getText()+")");
- conexion.close();
- labelResultado.setText("se registraron los datos");
- tf1.setText("");
- tf2.setText("");
- } catch(
You must be registered for see linksex){
- setTitle(ex.toString());
- } }
- });
Each time you give to "High" in the table field "code" generated a number: 1
When will the second time, it detects that there is a 1 and place a 2. Bone in order,
in each "insert" generated a number more ...