com.microsoft.sqlserver.jdbc.SQLServerException: '.' 附近有语法错误。
com.microsoft.sqlserver.jdbc.SQLServerException:'.'附近有语法错误。atcom.microsoft.sqlserver....
com.microsoft.sqlserver.jdbc.SQLServerException: '.' 附近有语法错误。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
..................
代码
String sql = "select ustudent.sid,sname,score1,score2 from usc, ucourse,ustudent"
+"where usc.cid=uCourse.cid and uStudent.Sid=usc.sid and cname=?";
stmt = conn.prepareStatement(sql);
stmt.setString(1,cname);
rs = stmt.executeQuery(); 展开
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
..................
代码
String sql = "select ustudent.sid,sname,score1,score2 from usc, ucourse,ustudent"
+"where usc.cid=uCourse.cid and uStudent.Sid=usc.sid and cname=?";
stmt = conn.prepareStatement(sql);
stmt.setString(1,cname);
rs = stmt.executeQuery(); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询