[web2py] Re: Web2py won't connect to MSSQL

2011-10-28 Thread Omi Chiba
Massimo, Chris Thank you both of your reply! I added import pyodbc in db.py and here's what I get. This is expected just like Chris described. "ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed." Then I tried mt.exe things. (See attached file) Strangely

[web2py] Re: Web2py won't connect to MSSQL

2011-10-27 Thread chris_g
I recently had a similar problem where I could import pyodbc at the python shell, but I was getting a DLL error when I tried to import pyodbc under mod_wsgi. I suggest that you put "import pyodbc" inside your wsgihandler.py (or at the top of db.py) and see what errors are being produced. I had rece

[web2py] Re: Web2py won't connect to MSSQL

2011-10-27 Thread Massimo Di Pierro
check web2py/gluon/dal.py there is a try: import pyodbc. remove the try and check whay it fails. Must be a patch issue. On Oct 25, 9:39 pm, Omi Chiba wrote: > CJM, > > Are you using apache using wsgi? if so, you're with me. You cannot > import > pyodbc.http://ochiba77.blogspot.com/2011/10/how-t

[web2py] Re: Web2py won't connect to MSSQL

2011-10-26 Thread Omi Chiba
CJM, Can I ask how you set the driver manually ? I want to try on my machine too. On Oct 26, 8:18 am, CJM wrote: > Thank you Massimo! > > The driver did return None and setting the driver manually did the > trick. > > Is this an issue with web2py or did I somehow setup my machine > incorrectly?

[web2py] Re: Web2py won't connect to MSSQL

2011-10-26 Thread CJM
Thank you Massimo! The driver did return None and setting the driver manually did the trick. Is this an issue with web2py or did I somehow setup my machine incorrectly? On Oct 25, 6:15 pm, Massimo Di Pierro wrote: > try: > > from gluon.dal import MSSQLAdapter > print MSSQLAdapter.driver > > M

[web2py] Re: Web2py won't connect to MSSQL

2011-10-25 Thread Omi Chiba
CJM, Are you using apache using wsgi? if so, you're with me. You cannot import pyodbc. http://ochiba77.blogspot.com/2011/10/how-to-setup-web2py-apache-wsgi.html If you're using rocket server, it should connect because I'm connecting without any problem. Only difference with your environment is th

[web2py] Re: Web2py won't connect to MSSQL

2011-10-25 Thread Massimo Di Pierro
try: from gluon.dal import MSSQLAdapter print MSSQLAdapter.driver My guess isthat it is failing to import pyodbc from dal.py somehow and the driver should should be set to driver = globals().get('pyodbc',None) is set to None instead. On Oct 25, 10:20 am, CJM wrote: > I'm unable to get web2

[web2py] Re: Web2py won't connect to MSSQL

2011-10-25 Thread CJM
It's a source code install. Hench the line: > >  Web2py: source code install version 1.99.2 (2011-09-26 06:55:33) :) On Oct 25, 12:10 pm, Bruno Rocha wrote: > are you using source code or .exe version of web2py? > > http://zerp.ly/rochacbruno > Em 25/10/2011 13:31, "CJM" escreveu: > > > > > >