java.sql.SQLExc eption: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression
having this error while trying to delete record from database as follows plz help me with this.
having this error while trying to delete record from database as follows plz help me with this.
Code:
try
{
String dsno=t[0].getText();
String qry="DELETE FROM sdetails WHERE Student no="+dsno+;
stat.executeUpdate(qry);
JOptionPane.showMessageDialog(this, "Record is deleted", "done", JOptionPane.INFORMATION_MESSAGE);
stat.close();
conn.commit();
conn.close();
}
catch(SQLException e)
{
System.out.println(e);
}
Comment