-- 作者:唐尸三摆手
-- 发布时间: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
-- 作者:唐尸三摆手
-- 发布时间:2010/4/2 13:27:00
--
Dim cmd As New SQLCommand Dim Count AS Integer cmd .CommandText = "update aeg00000 set plandesc=contractno from aeg00000 where centercode=\'0100\' and finishnum=0 and ifprocess=0 and warehousecode=\'0110\'" Count= cmd.ExecuteNonQuery() Messagebox.Show( "总共删除" & Count & "行!")