On windows 7, my VB6 app can't see 'System' DSN's but has no trouble finding 'User' DSN's
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!
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>
精彩评论