当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 给分。 ......
 ·谁能读懂这个程序    »显示摘要«
    摘要: 下面是一个对access数据库压缩的程序。我是初学者,根本搞不懂每一句在说什么,请能读懂的前辈给加上详细的注释。 拜托了  public declare function gettemppath lib "kernel32" alias _     "gettemppatha" (byval nbufferlength as long, byval ......


请大家帮忙看看错在哪里thank u

是sql   server   数据库  
   
          con   =   DbConnectionManager.getConnection();  
  //取日期  
          String   yestoday   =   request.getParameter("yestoday");  
          if(yestoday   ==   null   ||   yestoday.equals("")){  
  pstmt   =   con.prepareStatement("select   getdate()-1");  
  ResultSet   rs=pstmt.executeQuery();  
  String   yestodaya   =   rs.getString(1);  
  yestoday   =   yestodaya.substring(0,yestodaya.indexOf(   ));  
  pstmt.close();  
  }  
  //想取昨天的日期~~  
  错误提示:Invalid   operation   for   the   current   cursor   position.  
   
  各位大哥帮忙呀!

NO.1   作者: hyhong_h

在rs.getString()之前加一句:  
  rs.next();

NO.2   作者: flylijian

同上楼上的,你刚刚得到记录集,其游标在第一条记录以前,你必须先用  
  rs.next(   );命令移到第一条记录,才可以操作!


 ·cisco 路由器    »显示摘要«
    摘要: 想学cisco路由器的配置,还有想考ccna , 什么样的教材好,,最好英语了,。谢谢!! ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE