hi, can anyone help me to check my code and find where is the error
after run my project, it show me error in SQL statement
thx ya
private void initializeDB(){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conCustomer = DriverManager.getConnection("jdbcdbc:CustomerDB");
stmtCustomer = conCustomer.createStatement();
}
catch(Exception ex){
JOptionPane.showMessageDialog(null, "Error in connection to Database");
}
}
private void findCustomer(ActionEvent e){
String custID = jtfCustomerID.getText();
String sqlSelect = "Select * From Customers Where cust_ID = '" + custID + "'";
try{
ResultSet rsCustomer = stmtCustomer.executeQuery(sqlSelect);
System.out.println("Error");
if(rsCustomer.next()){
jlblCustomerName.setText(rsCustomer.getString("Cus t_Name"));
jlblCustomerAddress.setText(rsCustomer.getString(" Cust_Address"));
}
else{
JOptionPane.showMessageDialog(null, "Customer not found");
}
}
catch(SQLException ex){
JOptionPane.showMessageDialog(null, "Error in SQL Statement");
}
}