Scroll to see replies
Spoiler
Spoiler
if txtName.getText().trim().isEmpty() {
}
code got ****ed up
take 2:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try {
String url = "jdbc:derby://localhost:1527/StudentScores ";
String username = "admin3";
String password = "admin3";
Connection con = DriverManager.getConnection(url, username, password);
Statement stmt = con.createStatement();
String Query = "INSERT INTO STUDENT (NAME, DATEOFQUIZ, MEMORYSCORE, COMPREHENSIONSCORE, PROBLEMSOLVINGSCORE, AVERAGEPERCENTAGE)
VALUES ('"+NameText.getText()+"','"+DateText.getValue()+"','"+MemoryScoreText.getText()+"','"+ComprehensionScoreText.getText()+"','"+ProblemSolvingScoreText.getText()+"', '"+AveragePercentageText.getText()+"'";
JOptionPane.showMessageDialog(null, "Student Added";
NameText.setText(null);
DateText.setText("00/00/0000";
MemoryScoreText.setText(null);
ComprehensionScoreText.setText(null);
ProblemSolvingScoreText.setText(null);
AveragePercentageText.setText(null);
}
catch(SQLException ex)
{
JOptionPane.showMessageDialog(null, ex.toString());
}
}
Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 6 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 4 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 6 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 4 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]