are you using source code or .exe version of web2py?

http://zerp.ly/rochacbruno
Em 25/10/2011 13:31, "CJM" <coreymarq...@gmail.com> escreveu:

> I'm unable to get web2py to connect to mssql.
>
> <type 'exceptions.RuntimeError'>(Failure to connect, tried 5 times:
> 'NoneType' object has no attribute 'connect')
>
> My connection string is: db = DAL('mssql://
> testUser:password1@localhost/testDB')
>
> Environment
>  Windows Server 2008 R2, 64-bit operating system
>  SQL Server 2008 R2, local.
>  Web2py: source code install version 1.99.2 (2011-09-26 06:55:33)
> stable.
>  pyodbc
>  Python 2.7.2
>
> I've tested that I can connect using the pyodbc. The following code
> works:
>
> import pyodbc
> cnxn = pyodbc.connect('DRIVER={SQL
> Server};SERVER=localhost;DATABASE=testDB;UID=testUser;PWD=password1')
> cursor = cnxn.cursor()
> cursor.execute("select * from tbUsers")
> rows = cursor.fetchall()
> for row in rows:
>  print row
>
> Thanks for your time.
>
> Corey.

Reply via email to