1.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
分析:语法错误
解决:查看sql语句对应的属性名称是否跟数据库表中对应,表名是否正确,如果sql语句是分行写的,注意看行宇航主键的单词主键是否有空格等符号分割
2
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
分析:没有数据库的驱动
解决:导入数据库驱动 右键单击项目 选择build path ——configure build path..———选择右边的Add External JARS...找到对应的jar包 OK.
资源下载:http://download.csdn.net/detail/caojianlin_1993/7347909