关于jsp连接access数据库不成功问题,求高手看看。
错误信息如上:
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] D:\winxp\Tomcat 4.1\work\Standalone\localhost\_\holle_jsp.java:58: illegal escape character
[javac] String MM_conn3_STRING = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\jsp\jxsjk.mdb ";
[javac] ^
[javac] D:\winxp\Tomcat 4.1\work\Standalone\localhost\_\holle_jsp.java:58: illegal escape character
[javac] String MM_conn3_STRING = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\jsp\jxsjk.mdb ";
[javac] ^
[javac] 2 errors
------解决方案--------------------jsp文件不能正常编译,好象你的驱动写错了吧,jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\jsp\jxsjk.mdb "这种写法我没有见过哦!
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
Connection con=DriverManager.getConnection( "jdbc:odbc:数据源名字 ");
------解决方案--------------------贴代码出来看看
------解决方案--------------------String MM_conn3_STRING = "jdbc:odbc:driver={Microsoft Access Drive