各位仁兄,小弟想请教一下怎样用VB+ACCESS实现将字段1里面的数字乘上一个系数并把所得的结果写入字段2中.谢谢了先!

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

我的程序代码:  
  private   sub   command1_click()  
  dim   cnn   as   adodb.connection  
  set   cnn   =   new   adodb.connection  
  cnn.open   ("provider=microsoft.jet.oledb.4.0;data   source=e:\shi\shi\5.19\毕业论文(设计)资料\pinzhong.mdb;persist   security   info=false")  
        cnn.execute   ("alter   table   new13   add   column   适合肥力密度   text")  
        if   turangzixun.feili   =   低肥力   then  
              cnn.execute   ("select   适宜密度*1.15   as   适合肥力密度   from   new13")   这里有问题吗?  
        elseif   turangzixun.feili   =   中等肥力   then  
            cnn.execute   ("select   适宜密度*1   as   适合肥力密度   from   new13")      
        elseif   turangzixun.feili   =   高肥力   then  
        cnn.execute   ("select   适宜密度*0.9   as   适合肥力密度   from   new13")  
        end   if

· 网友精彩回答:

发表者:zgvslch

用update语句吧  
  update   new13   set   适宜密度=   适宜密度   *   1.15

.
处理 SSI 文件时出错
© 2006-2008 All Rights Reserved