JRUN4环境连接ACCESS库问题!(在线等,PASS立刻结贴)
qtst 2003-10-16 03:24:20 各位高手,我的程序如下:
<%@ page info="database handler"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%
ResultSet rs=null;
try{
Class.forName("sun.jdbc.odbc.JdbcoOdbcDriver");
}
catch(Exception e)
{out.print("AAb");
}
try{
Connection con=DriverManager.getConnection("jdbc:odbc:qqtt","root","root");
Statement stmt=con.createStatement();
rs=stmt.executeQuery("select * from aa");
while(rs.next())
{
out.print(rs.getString("1"));
}
}
catch(Exception e){
out.print("AA");
}
%>
</body>
</html>(大部分是照书上写的)
但结果却是:AAbAA
这说明执行了抛错部分?还有就是日志说找不到sun.jdbc.odbc.JdbcoOdbcDriver,连库的用户名和密码也没错,不知道为什么会这样,请各位高手指点,最好是能给出例子说明!!!谢谢!!