Foxtable(狐表)用户栏目专家坐堂 → 有几个虫子


  共有11735人关注过本帖平板打印复制链接

主题:有几个虫子

帅哥哟,离线,有人找我吗?
唐尸三摆手
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:928 积分:7769 威望:0 精华:13 注册:2008/9/1 11:58:00
有几个虫子  发帖心情 Post By:2010/4/1 8:38:00 [只看该作者]

1.外部查询表能够编辑。
2.预览sql命令不能显示查询结果。
3.下面的代码为什么提示出错呢?sql语句在sql查询管理器中执行正常,但是在FOXTABLE中的命令窗口执行错误如图
Dim cmd1 As New SQLCommand
Dim cmd2 As New SQLCommand
Dim cmd3 As New SQLCommand
Dim cmd4 As New SQLCommand
Dim Count AS Integer
Dim Count1 AS Integer
Dim Count2 AS Integer
Dim Count3 AS Integer
Dim Count4 AS Integer
cmd1.CommandText = "update aef00000 set aef00000.deptcode=b.deptcode from aef00000 a,abb00000 b where a.itemcode=b.itemcode and  a.deptcode='' and a.centercode='0100' and a.plannum<>0"
Count1= cmd1.ExecuteNonQuery()
cmd2.CommandText = "update aef00000 set aef00000.workcentercode=b.workcentercode from aef00000 a,abc00000 b where a.itemcode=b.itemcode and  a.workcentercode='' and a.centercode='0100' and a.plannum<>0 and b.code='0001'"
Count2= cmd2.ExecuteNonQuery()
cmd3.CommandText = "update aeg00000 set aeg00000.deptcode=b.deptcode from aeg00000 a,abb00000 b where a.itemcode=b.itemcode and  a.deptcode='' and a.centercode='0100' and a.plannum<>0"
Count3= cmd3.ExecuteNonQuery()
cmd4.CommandText = "update aeg00000 set aeg00000.workcentercode=b.workcentercode from aeg00000 a,abc00000 b where a.itemcode=b.itemcode and  a.workcentercode='' and a.centercode='0100' and a.plannum<>0 and b.code='0001'"
Count4= cmd4.ExecuteNonQuery()
count=Count1+Count2+Count3+Count4
Messagebox.Show( "总共更新" & Count & "行!")

图片点击可在新窗口打开查看此主题相关图片如下:pic036.jpg
图片点击可在新窗口打开查看

 回到顶部