还有一个问题!
原程序如下:
<%
String word=request.getParameter("text");
%>
<%
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:productstoreroom";
Connection con=DriverManager.getConnection(url);
PreparedStatement select_stm=con.prepareStatement("select CPU from configure where productname=?");
select_stm.setString(1,word);
ResultSet result=select_stm.executeQuery();
out.println(result.getString("CPU"));
con.close();
}catch(Exception e)
{out.println(e);}
%>
为什么调试的时候出现“java.sql.SQLException: [Microsoft][ODBC 驱动程序 管理器] 非法的游标状态 ”的错误提示????
(该程序的功能是从页面上提取一个关键字,根据这个关键字到数据库里去查询相关内容。然后回显出来。)