在 Windows 7 上,我的 VB6 应用程序看不到“系统” DSN,但可以轻松找到“用户” DSN 的
有一段时间,我一直在尝试让 Visual Basic 6 应用程序在 Windows 7 中运行。最后剩下的障碍是它在启动时找不到 DSN。凭直觉,我删除了系统 DSN,并以完全相同的方式创建它,但在 Users 中。突然间,一切都运转良好。我简直不敢相信,所以我试图将其移回系统,认为我可能出了什么问题,但果然它又坏了。
我似乎在谷歌搜索中找不到其他人遇到这种情况,但是有人知道为什么会发生这种情况吗?
我真的很想重新使用系统 DSN,因为这样更容易管理。
谢谢!
For a while I was stuck trying to get a visual basic 6 app working in Windows 7. The last remaining snag was that it just couldn't find the DSN when starting up. On a hunch, I deleted the system DSN and created it exactly the same way, but in Users. Suddenly everything worked great. I couldn't beleive it so I tried to move it back to system thinking I may have had something wrong, but sure enough it was broken again.
I can't seem to find anyone else running into this in my google searches, but does any one have any ideas as to why this might happen?
I'de really like to go back to using the system DSN as that's easier to manage.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果通过右键单击该图标并选择“以管理员身份运行”来启动 VB6 应用程序,会发生什么情况?我怀疑您随后会看到系统 DSN(可能仅对管理员级别帐户可见)。
更新:我认为这会起作用 - 通过运行以下命令设置您的系统 DSN:
C:\Windows\SysWOW64\odbcad32.exe
我认为问题是默认的 Win7用于配置 DSN 的接口使其成为 64 位的,但您需要 32 位 DSN 才能与 VB6 一起使用。
What happens if you start your VB6 application by right-clicking the icon and choosing "Run as administrator"? I suspect you would then see the System DSNs (which are presumably only visible to admin-level accounts).
Update: I think this will work - set up your system DSN by running this:
C:\Windows\SysWOW64\odbcad32.exe
I think the problem is that the default Win7 interface for configuring DSNs makes them 64-bit, but you need a 32-bit DSN to work with VB6.
</PUREGUESSWORK>