On Monday, May 21, 2012 2:45:52 PM UTC-5, Anthony wrote:
>
> Yes, web2py uses pyodbc for MSSQL as well as a few other databases:
> http://code.google.com/p/web2py/source/browse/gluon/dal.py#2529.
>
> On Monday, May 21, 2012 3:09:31 PM UTC-4, Andrew wrote:
>>
>> Have you installed pyodbc ? It's needed for mssql
>> http://www.web2py.com/books/default/chapter/29/6#Dependencies
>
>
Yes I have installed pyodbc. However when I run this
import pyodbc
cnxn = pyodbc.connect('DRIVER={SQL
Server};SERVER=SERVER;DATABASE=NAME;UID=USERNAME;PWD=PASSWORD')
cursor = cnxn.cursor()
I get a login failed. My username is COMPANYDOMAINNAME\username to get
access to the database. The error message it's reporting back is that the
user COMPANYDOMAINNAME\\username login failed.
It is automatically putting two forward slashes when my username only
contains one. However it does not automatically put two on the server
instance SERVER\instance. Is there any way to force it to only put one
forward slash?