String sql = "select rate from currency where scountry ="+"'" +jComboBox1.getSelectedItem() + "'"+"and dcountry="+"'"+jComboBox2.getSelectedItem()+"'";
try
{
rs = st.executeQuery(sql);
while(rs.next())
{
jTextField3.setText(rs.getString("rate"));
}
}
catch(Exception e)
{
System.out.println(e);
}
按钮功能实现语句,但提示错误java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] FROM 子句语法错误。
不明白为什么...