从 html 页面将数据插入数据库,我已经成功地将数据传递给 jsp,然后是 java 文件,但是在将数据插入数据库时出现错误。
这是查询:
String ResultQuery = "INSERT INTO Results (homeTeam, awayTeam, homeScore, awayScore)" +
"VALUES (+HomeTeam+','+AwayTeam+','+HomeScore+','+AwayScore+)";
这是错误:
javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '+HomeTeam+','+AwayTeam+','+HomeScore+','+AwayScore+'.