主题:下面语句错在哪?
qiuluhui
[专家分:0] 发布于 2011-04-23 12:20:00
用下面语句更新时间时,当用select查询到jhx表中的记录只有一条时,执行成功,有多条记录时则失败。为什么?
zhjdh=ALLTRIM(thisform.text10.value)
lsj=DATETIME()
=SQLSETPROP(nHandle,"Transactions",2) &&开始人工事务处理
spkjhx="UPDATE spk set spk.时间=?lsj where spk.编号= "+;
"(select jhx.编号 from jhx where jhx.单号=?zhjdh group by jhx.编号)"
sqlspkjhx=Sqlexec(nHandle,spkjhx) &&&修改最后补货
IF sqlspkjhx=1
=SQLCOMMIT(nHandle) &&成功则事务交付
messagebox('成功!',0+48,'提示:')
ELSE
=SQLROLLBACK(nHandle) &&失败则事务回滚
=MESSAGEBOX("失败,请重新执行!",0+16,"提示")
ENDIF
=SQLSETPROP(nHandle,"Transactions",1) &&结束人工事务处理
回复列表 (共4个回复)
沙发
狐说八道 [专家分:860] 发布于 2011-04-25 09:11:00
IF sqlspkjhx=1
==>
IF sqlspkjhx>0
板凳
cchmhao2010 [专家分:10] 发布于 2011-04-27 17:43:00
[url=http://www.worldgodshop.com/]Supra Shoes[/url] [url=http://www.worldgodshop.com/]Radii shoes[/url] [url=http://www.worldgodshop.com/]Prada Shoes[/url] [url=http://www.worldgodshop.com/]Jordan shoes[/url] [url=http://www.worldgodshop.com/]Christian Louboutin shoes[/url]
http://www.worldgodshop.com/
3 楼
lbscyb [专家分:4780] 发布于 2011-05-02 23:26:00
spkjhx="UPDATE spk set spk.时间=?lsj where spk.编号= "+;
"(select jhx.编号 from jhx where jhx.单号=?zhjdh group by jhx.编号)"
--------------------------------------------------------------------
多条记录用 in 试试
spkjhx="UPDATE spk set spk.时间=?lsj where spk.编号 in "+;
"(select jhx.编号 from jhx where jhx.单号=?zhjdh group by jhx.编号)"
4 楼
sharrow [专家分:0] 发布于 2011-06-23 22:18:00
[url=http://www.worldsmileshop.com/nike-air-jordan-shoes-c-15.html/]cheap Nike air Jordan shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-5-v-shoes-c-15_18.html/]cheap Air Jordan 5 (V) shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-6-vi-shoes-c-15_19.html/]cheap Air Jordan 6 (VI) shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-7-vii-shoes-c-15_76.html/]cheap Air Jordan 7 (VII) shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-8-viii-shoes-c-15_77.html/]cheap Air Jordan 8 (VIII) shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-9-ix-shoes-c-15_78.html/]cheap Air Jordan 9 (IX) shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-10-x-shoes-c-15_79.html/]cheap Air Jordan 10 (X) shoes[/url]
[url=http://www.worldsmileshop.com/air-jordan-11-xi-shoes-c-15_80.html/]cheap Air Jordan 11 (XI) shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-12-xii-shoes-c-15_81.html/]cheap Air Jordan 12 (XII) shoes [/url]
[url=http://www.worldsmileshop.com/air-jordan-13-xiii-shoes-c-15_82.html/]cheap Air Jordan 13 (XIII) Shoes [/url]
[url=http://www.worldsmileshop.com/nike-dunk-high-men-shoes-c-50_65.html/]cheap Nike Dunk High Men Shoes [/url]
[url=http://www.worldsmileshop.com/nike-dunk-low-men-shoes-c-50_66.html/]cheap Nike Dunk Low Men Shoes [/url]
[url=http://www.worldsmileshop.com/nike-dunk-mid-men-shoes-c-50_67.html/]cheap Nike Dunk Mid Men Shoes [/url]
[url=http://www.worldsmileshop.com/nike-dunk-high-women-shoes-c-50_68.html/]cheap Nike Dunk High Women Shoes [/url]
[url=http://www.worldsmileshop.com/nike-dunk-low-women-shoes-c-50_69.html/]cheap Nike Dunk Low Women Shoes [/url]
[url=http://www.worldsmileshop.com/cole-haan-air-conner-shoes-c-70_71.html/]cheap Cole Haan Air Conner shoes [/url]
[url=http://www.worldsmileshop.com/cole-haan-air-conner-boots-c-70_72.html/]cheap Cole Haan Air Conner Boots [/url]
[url=http://www.worldsmileshop.com/mens-gucci-low-top-shoes-c-55_73.html/]cheap Men's Gucci Low Top Shoes [/url]
[url=http://www.worldsmileshop.com/mens-gucci-middle-top-shoes-c-55_74.html/]cheap Men's Gucci Middle Top Shoes [/url]
[url=http://www.worldsmileshop.com/mens-gucci-high-top-shoes-c-55_75.html/]cheap Men's Gucci High Top Shoes [/url]
[url=http://www.worldsmileshop.com/prada-mens-low-shoes-c-13_14.html/]cheap Prada Men's Low Shoes [/url]
[url=http://www.worldsmileshop.com/prada-high-men-shoes-c-13_20.html/]cheap prada high men shoes [/url]
[url=http://www.worldsmileshop.com/prada-mens-slipper-c-13_58.html/]cheap Prada Men's Slipper [/url]
[url=http://www.worldsmileshop.com/supra-skytop-c-3_4.html/]cheap Supra Skytop shoes[/url]
[url=http://www.worldsmileshop.com/supra-shoes-c-3.html/]cheap Supra shoes [/url]
[url=http://www.worldsmileshop.com/radii-footwear-c-7.html/]cheap RADII Footwear shoes[/url]
[url=http://www.worldsmileshop.com/420top-c-7_8.html/]420TOP [/url]
[url=http://www.worldsmileshop.com/christian-louboutin-pumps-c-21_36.html/]cheap Christian Louboutin Pumps shoes[/url]
[url=http://www.worldsmileshop.com/christian-louboutin-evening-c-21_43.html/]cheap Christian Louboutin Evening [/url]
[url=http://www.worldsmileshop.com/christian-louboutin-sandals-c-21_33.html/]cheap Christian Louboutin Sandals [/url]
[url=http://www.worldsmileshop.com/christian-louboutin-boots-c-21_40.html/]cheap Christian Louboutin Boots[/url]
我来回复