none
Windows 7 and database connection

    Question

  • I have a problem with our Windows 7 laptops. On users login they run a simple application that connects to a database (using a SQLOLEDB connection string) and writes a couple of entries. This works fine for all users on our XP machines (and has worked since our Windows 95 days)

    Now, on the Windows 7 machines all users get the generic 'SQL Server does not exist or access denied' message when this application is run. It will only run successfully as an admin user.

    I've tried everything I can think of, including disabling the firewall completely (althought this would surely affect admin users as well). The users can connect to the same database using a UDL file so I know the connection details and connectivity are correct.

    If I can't resolve this then our Windows 7 rollout is dead in the water as it is essential to run this application. The app. was created in VB6 and even worked under Vista when tested.

    For info it uses the Active Data Access Objects 2.5 Library and the sql connection string uses the 'Provider=SQLOLEDB' parameter.

    Edit: I've also tried update SQL Server Express 2005 to SP3 and it makes no difference. Windows 7 obviously has a bug that prevents programs from connecting in this way. Thats the end of our Windows 7 deployment then!

    Wednesday, June 09, 2010 9:08 AM

Answers

  • Older applications often can't cope with User Account Control.  There are some ways to make it work:

    • modify the Compatibility settings of the application to "Run as administrator" - this setting can also be distributed as a GPO. Of course, it doesn't work if your users don't have elvation rights
    • use the Application Compatibility Toolkit to create a shim - good tutorial on doing this is here
    • if you have SA and the MDOP, use Microsoft Application Virtualization to sequence and distribute the front-end app.  App-V does a remarkably good job at mitigating compatibility problems
    • failing any of those solutions, XP Mode will get you around the issue so that you can at least continue with the Windows 7 migration

    We've just done an 1100-seat migration from XP to Windows 7, and while there are certainly some apps which don't want to play ball, there are always workarounds.

    • Proposed as answer by Vivian Xing Monday, June 14, 2010 3:40 AM
    • Marked as answer by Vivian Xing Monday, June 21, 2010 2:32 AM
    Friday, June 11, 2010 4:19 AM

All replies

  • Unfortunately as expected - no reply from MS and no workable solution.

    An application that uses an SQLOLEDB connection does not work in W7 unless you're an admin. Not much of a step forward really is it! At least now I can justify why we won't be upgrading 700 PCs to W7. Saves us a packet.

    Thursday, June 10, 2010 2:01 PM
  • Older applications often can't cope with User Account Control.  There are some ways to make it work:

    • modify the Compatibility settings of the application to "Run as administrator" - this setting can also be distributed as a GPO. Of course, it doesn't work if your users don't have elvation rights
    • use the Application Compatibility Toolkit to create a shim - good tutorial on doing this is here
    • if you have SA and the MDOP, use Microsoft Application Virtualization to sequence and distribute the front-end app.  App-V does a remarkably good job at mitigating compatibility problems
    • failing any of those solutions, XP Mode will get you around the issue so that you can at least continue with the Windows 7 migration

    We've just done an 1100-seat migration from XP to Windows 7, and while there are certainly some apps which don't want to play ball, there are always workarounds.

    • Proposed as answer by Vivian Xing Monday, June 14, 2010 3:40 AM
    • Marked as answer by Vivian Xing Monday, June 21, 2010 2:32 AM
    Friday, June 11, 2010 4:19 AM