Python connection with SQL Anywhere 16 fails

Asked

Viewed 103 times

0

Hello!

I’m trying to connect Python with a Sybase database but all the ways I try, ends up giving this error.

Traceback (Most recent call last): File "C: Users Yuri.Mendonca Appdata Local Programs Python Python35 Scripts dominio_connection.py", line 2, in Conn = pyodbc.connect('Driver={SQL Anywhere 16};' pyodbc.Operationalerror: ('08001', '[08001] [Sybase][ODBC Driver][SQL Anywhere]Database server not found (-100) (Sqldriverconnect)')

My code is like:

import pyodbc  conn = pyodbc.connect('Driver={SQL Anywhere 16};'
                      'Server=***.**.**.***;'
                      'Database=*********;'
                      'Trusted_Connection=yes;')

cursor = conn.cursor() cursor.execute('select...')

for row in cursor:
    print(row)

I’ve used the same code to connect to a SQL Server database and managed without problems, to connect to a SQL Anywhere database is not going.

Any suggestions?

  • Made sure that the Database informed exists on the server?

  • Try with a service re-start.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.