找回密码
 加入
搜索
查看: 1548|回复: 0

如何得到ado的Execute执行所影响的记录数?

[复制链接]
发表于 2009-12-1 20:45:16 | 显示全部楼层 |阅读模式
Dim $Cn1 = ObjCreate("Adodb.Connection")
Dim $CountRecord=0
With $Cn1
    .Provider = "Microsoft.Jet.OLEDB.4.0;"
    .ConnectionString = "Data Source=" & @ScriptDir & "\数据库.mdb;"
    .CursorLocation = 3                ;3=adUseClient
    .Open
    .Execute("UPDATE a SET a1=1", $CountRecord)
EndWith
msgbox (0,0,$CountRecord)

注:数据库中有记录,$CountRecord 中没有返回数据库修改记录数量!??
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 17:22 , Processed in 0.082799 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表