F
ff_ff
Unregistered / Unconfirmed
GUEST, unregistred user!
Access数据库,
[Microsoft][ODBC 驱动程序管理器]无效的描述器索引
错误.
在access中,select count(*) from question;
对吗?
public class ComputeServlet extends HttpServlet{
public voiddo
Get(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
System.out.println("in ComputeServlet"
int count = 0;
ConnAccess conn = null;
try{
conn = new ConnAccess();
String sql = "select count(*) from question";
ResultSet rs = conn.Query(sql);
System.out.println(sql);
rs.next();
count = rs.getInt(0);// 这里出错.
}catch(Exception e){
e.printStackTrace();
}
try{
conn.close();
}catch(Throwable ee){
ee.printStackTrace();
}
System.out.println(count);
}
public voiddo
Post(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
do
Get(request, response);
}
}
[Microsoft][ODBC 驱动程序管理器]无效的描述器索引
错误.
在access中,select count(*) from question;
对吗?
public class ComputeServlet extends HttpServlet{
public voiddo
Get(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
System.out.println("in ComputeServlet"
int count = 0;
ConnAccess conn = null;
try{
conn = new ConnAccess();
String sql = "select count(*) from question";
ResultSet rs = conn.Query(sql);
System.out.println(sql);
rs.next();
count = rs.getInt(0);// 这里出错.
}catch(Exception e){
e.printStackTrace();
}
try{
conn.close();
}catch(Throwable ee){
ee.printStackTrace();
}
System.out.println(count);
}
public voiddo
Post(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
do
Get(request, response);
}
}