获取插入行时受影响的记录 [英] Get Records Affected on inserting a row
本文介绍了获取插入行时受影响的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新手来访问vba。我正在尝试创建一个代码,通过链接表将行插入Oracle Db。我想检查行是否插入到我的Oracle数据库中,因此我正在使用数据库的Access RecordsAffected属性。
下面是我正在使用的代码片段:
展开 | 选择 | Wrap | 行号
解决方案
当我删除execute语句中的dbFailOnError时,我没有得到ODBC失败的错误,记录被插入我的数据库,但RecordsAffected属性返回0而不是1.
任何人都可以帮助为什么它返回0?
谢谢提前预订。
问候,
-Dileep
我们需要你正在使用的访问版本和你我们必须向我们展示第4行。
你可以放置***密码和用户名如果需要。
您好我正在使用Access 2007及以下是我正在使用的代码
展开 | 选择 | Wrap | 行号
Hi,
I am new to access vba. i am trying to create a code to insert rows into Oracle Db via linked tables. I wanted to check if the row is inseted into my Oracle DB or not and so i am using Access RecordsAffected property of Database.
below is the code snippet i am using:
Expand|Select|Wrap|Line Numbers解决方案When i remove the dbFailOnError in the execute statement, i am not getting the ODBC failed error and the record is being inserted into my DB but the RecordsAffected property returns 0 instead of 1.
Can anyone help why is it returning 0?
Thank you in advance.
Regards,
-Dileep
We need the version of access you are using and you''re going to have to show us line 4.
you can place "***" for passwords and user names if needed.
Hi i am using Access 2007 and below is the code i am using
Expand|Select|Wrap|Line Numbers
这篇关于获取插入行时受影响的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆