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

 

    摘要: 各位高手: 我的sql server(是7.0的)是和windows nt4(域是sqldomain)裝在一台ibm server上的! sql server的身份驗證方式為-----use windows nt authenticcation 在自動啟動服務里有4項: 1. msdt----automatic (system account) 2. ms sql server---- a......
 ·唉,被别人问住了    »显示摘要«
    摘要: 有两个文件 my1.java public class my1 { public static void main(string[] args) { jmyframe frame=new jmyframe(); frame1.setdefaultcloseoperation(jframe.exit_on_close); frame1.show(); } 我把 class jmyframe ......


一个不应该很难的问题,100分相送

If   rptReduct1.State   =   adStateOpen   Then   rptReduct1.Close  
      rptReduct1.Open   "select   id   from   employee",   dbConnect,   adOpenDynamic  
   
  For   intI   =   0   To   rptReduct1.RecordCount   -   1  
      rptReduct1.Fields("reduct").Value   =   0  
      rptReduct1.MoveNext  
    Next   intI  
  当执行的时候,总是跳过FOR循环,调试的时候说我的总说我的rptReduct1.RecordCount的值为-1,而我的数据库id字段确实有20个值,不知道这是为什么清各位帮忙解答!100分相送!

NO.1   作者: qingming81

再作修改如下:  
  If   rptReduct1.State   =   adStateOpen   Then   rptReduct1.Close  
      rptReduct1.Open   "select   id,   reduct   from   employee",   dbConnect,   adOpenDynamic,   adlockoptimistic  
      rptReduct1.movefirst  
      rptReduct1.movelast  
   
  For   intI   =   1   To   rptReduct1.RecordCount    
      rptReduct1.Fields("reduct")   =   0   你要更新reduct字段,查询中必须有这个字段  
      rptReduct1.MoveNext  
  Next   intI  
  如果还有问题,请在ACCESS表中查看你的ID字段是否有问题,或直接在ACCESS中用这个SQL语句查出结果来看看

NO.2   作者: lihonggen0

If   rptReduct1.State   =   adStateOpen   Then   rptReduct1.Close  
          rptReduct1.CursorLocation   =   adUseClient  
      rptReduct1.Open   "select   id   from   employee",   dbConnect,   adOpenDynamic  
   
  For   intI   =   0   To   rptReduct1.RecordCount   -   1  
      rptReduct1.Fields("reduct").Value   =   0  
      rptReduct1.MoveNext  
    Next   intI  
 

NO.3   作者: Quady515

Recordset   对象的游标类型会影响是否能够确定记录的数目。对仅向前游标,RecordCount   属性将返回   -1,对静态或键集游标返回实际计数,对动态游标取决于数据源返回   -1   或实际计数。  
 


 ·奇怪的问题,谁能解释一下    »显示摘要«
    摘要: private sub form_load() dim a as long dim b as long dim c as long b = 330 c = 180 a = b / c debug.print b / c debug.print a end sub 显示:1.83333333333333 2 为什么?!!!! ......
» 本期热门文章:

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