MSAccess 错误:类不支持自动化或不支持预期的接口
问题是它正在 C:\Windows\SysWOW64\stdole2.tlb 中寻找 OLE 自动化参考,
这对于 64 位用户来说很好,但对于 32 位用户来说不行。 我该如何解决这个问题?
如何查明引用是否在任何地方使用? 我担心简单地删除引用然后发现它在某个地方被使用。
更新:下面是触发错误的地方:
Error --> Set Cnxn = New ADODB.Connection
With Cnxn
.Provider = "MSDataShape"
.Properties("Data Provider").Value = "SQLOLEDB"
.Properties("Data Source").Value = dbserver
.Properties("User ID").Value = username
.Properties("Password").Value = password
.Properties("Initial Catalog").Value = dbname
.CommandTimeout = 120
.ConnectionTimeout = 120
.Open
End With
The issue is that it's looking for the OLE Automation reference in C:\Windows\SysWOW64\stdole2.tlb
Which is fine for 64bit users but not for 32bit.
How would I fix this?
How do I find out if the reference is used anywhere?
I'm afraid of simply removing the reference then finding out it's being used somewhere.
Update: Below is where the error is triggered:
Error --> Set Cnxn = New ADODB.Connection
With Cnxn
.Provider = "MSDataShape"
.Properties("Data Provider").Value = "SQLOLEDB"
.Properties("Data Source").Value = dbserver
.Properties("User ID").Value = username
.Properties("Password").Value = password
.Properties("Initial Catalog").Value = dbname
.CommandTimeout = 120
.ConnectionTimeout = 120
.Open
End With
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请检查windows 7. SP1的服务包出现错误。应该在以后或以前的服务包中编译。
shld check the service pack of windows 7. SP1 gives an error. should compile in a later or previous service pack.
所有引用都指向 C:\Windows\SysWOW64,因此会在 32 位计算机上导致错误。
我在 32 位计算机上打开 Access 应用程序,并重新添加之前指向 SysWOW64 文件夹的所有引用。
谢谢!
All references are pointing to C:\Windows\SysWOW64 and therefore causing the errors on 32 bit machines.
I opened the Access app on a 32bit machine and re-added the all the references that were previously pointing to the SysWOW64 folder.
Thanks!