vendredi 29 mai 2015

Query Does not return results Sqlite

try {

                Class.forName("org.sqlite.JDBC");

                Connection connit  = DriverManager.getConnection("jdbc:sqlite://C://Users//Asus//Dropbox//ProjectData.sqlite");

                String query1= "insert into email (subject,message) values(?,?)";
                PreparedStatement pst=connit.prepareStatement(query1);
                pst.setString(1, subject.getText());

                pst.setString(2, message.getText());

                JOptionPane.showMessageDialog(null, "Message Sent");
                pst.executeQuery();
                pst.close();
                connit.close();
            }catch (Exception e){
                e.printStackTrace();

            }

Hey guys, I know it's probably a very silly mistake but I can't seem to find it. As you all can understand I want to send some data over to my table. Please help. The error is Squery Does not return results.

Aucun commentaire:

Enregistrer un commentaire