pypyodbc icon indicating copy to clipboard operation
pypyodbc copied to clipboard

Connect to azure Sql

Open ronmorg opened this issue 5 years ago • 1 comments

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)

ronmorg avatar Mar 15 '19 20:03 ronmorg

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.

braian87b avatar Apr 03 '19 18:04 braian87b