pypyodbc
pypyodbc copied to clipboard
Connect to azure Sql
i seem to not be able to connect to azure in the cloud using pypyodbc
pypyodbc.ProgrammingError: (u'42000', u"[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Reference to database and/or server name in 'master..sysdatabases' is not supported in this version of SQL Server.")
mycode goes something like this:
cnxn = pyodbc.connect('DRIVER='+driver+';SERVER='+server+';PORT=1433;DATABASE='+database+';UID='+username+';PWD='+ password)
That is an ODBC error, try to fix your odbc connection first... or put the evaluated connection string here... also google "Azure ODBC SQL Server Driver" to get more help on this topic. Azure have some tricks to make it work.