Thursday , July 7 2022
Home / Java / JAVA #32 – Java application using SQL server (Part: 03)

JAVA #32 – Java application using SQL server (Part: 03)

buy Clomiphene from india January 22, 2016 Java, SQL Server Leave a comment 1,573 Views

buy gabapentin 300 mg for dogs

can i buy Clomiphene in abu dhabi Submit Button Code

String INTPUTQUERY = "Insert into tblUser Values('"+txtName.getText().toString()+"','"+txtEmail.getText().toString()+"','"+txtPass.getText().toString()+"',"+txtAge.getText().toString()+")"; objDB = new DBContext(); try { objDB.ExeQuery(INTPUTQUERY); } catch (ClassNotFoundException ex) { Logger.getLogger(frmMain.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(frmMain.class.getName()).log(Level.SEVERE, null, ex); } ResetInsert(); JOptionPane.showMessageDialog(this, "Data Inserted");

Show Button Code

        String ShowQuery = "Select * From tblUser";
            objDB = new DBContext();
        try {
            ResultSet rs = objDB.ShowData(ShowQuery);
            TAMessage.setText("");
            TAMessage.append("ID        Name         Email        Password        Age\n");
            while(rs.next())
            {            
            TAMessage.append(rs.getString(1)+" "+ rs.getString(2)+" "+ rs.getString(3)+" "+rs.getString(4)+" "+rs.getString(5)+"\n");
            }            
                        
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(frmMain.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(frmMain.class.getName()).log(Level.SEVERE, null, ex);
        }

 

 

About Faheem

An adaptable and responsible Software Engineer, who enjoys working with computers and the opportunity to learn new skills and work with new technologies is particularly attractive to me.

Check Also

JAVA #31 – Exception Handling In Java

Video In Progress…

Leave a Reply

Your email address will not be published.