ADO记录集问题 [英] ADO Recordset Problem

查看:84
本文介绍了ADO记录集问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个Access 2002应用程序,我正在使用ADODB将记录插入SQL Server 2000后端的表中。我正在使用连接对象和记录集对象。



该代码适用于40位用户,但根本不适用于2位特定用户。



当我逐步浏览代码时,我发现记录集从未打开过,我已经测试了我的连接对象并且它已经打开了。



在记录集下方的点不会打开。



Hi All,

I have an access 2002 application, I''m using ADODB to insert a record into a table in a SQL Server 2000 backend. I am using a connection object and a recordset object.

The code for works fine for 40 users, but simply will not work for 2 particular people.

When I step through the code as these users I see that the recordset never opens, I have tested my connnection object at this point and it is open.

At the point below the recordset does not open.

Set rs = New ADODB.Recordset
rs.Open strSQL, dbRDDTCnn, adOpenDynamic, adLockOptimistic





我无法理解为什么适用于这么多人的vba代码不适合只有两个人。



我会非常感谢你提出的任何建议



谢谢!!



I cannot fathom why vba code that works perfectly for so many people would not work for just two people.

I would be very grateful for any suggestions you might have

Thank you!!

推荐答案

首先,请阅读我的(losmac)评论。在致电开放式方法之前[ ^ ]对于记录集,您需要打开连接。如果连接已打开,请尝试更改 CurstorType [ ^ ]参数,从: adOpenDynamic 到: adOpenStatic adOpenUnspecified



更多:如何打开ADO连接和记录集对象 [ ^ ]
First of all, read my (losmac) comment to your question. Before you call open method[^] for recordset, you need to open connection. If connection is open, try to change CurstorType[^] parameter, from: adOpenDynamic to: adOpenStatic or adOpenUnspecified.

More: How To Open ADO Connection and Recordset Objects[^]


这篇关于ADO记录集问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆