I'm having a exactly the same problem with this. Just like Adam describe, I can connect mssql if I run web2py with rocket. Pyodbc error with web2py under Apache and mod_wsgi <https://groups.google.com/forum/#!searchin/web2py/pyodbc$20apache/web2py/OAHfTqQnhvo/fCh-kPa5jrYJ>
I tried with two different PC (Windows XP and 7) but the same error happens. Is there anyone who are connecting mssql with Apache and mod_wsgi ? Error ticket on web2py: It simply says failed to connect five times <type 'exceptions.RuntimeError'>(Failure to connect, tried 5 times: 'NoneType' object has no attribute 'connect') My setting is: - Windows XP/7 32bit - Python: 2.7.2 - web2py: 1.98.2 - pyodbc-2.1.11.win32-py2.7 - mod_wsgi-win32-ap22py27-3.3.so - pywin32-216.win32-py2.7 - httpd-2.2.21-win32-x86-openssl-0.9.8r I tried Adam's way but encountered so many errors to build. I did built it by visual C++ 2008 Express compiler but the same error.

