2

I have a connection to PostgreSQL created in the Windows ODBC Data Source. I'm using pyodbc to connect to the PostgreSQL database like this:

conn = pyodbc.connect('DSN=PostgreSQL35W')

I'm now using SQLAlchemy and would like to connect to the database using a Windows DSN like I do with pyodbc. Is this possible? I need to use the Windows DSN.

4
  • Is this Connecting postgresql with sqlalchemy question help you? Commented Jul 16, 2019 at 17:50
  • Possible duplicate of Connecting postgresql with sqlalchemy Commented Jul 16, 2019 at 17:53
  • Based on your results I don't think SQLAlchemy supports using pyodbc to connect to PostgreSQL which means it won't support ODBC DSNs. Commented Jul 16, 2019 at 20:47
  • Also, please delete the two answers you posted that were in response to my answer. The feedback was welcome and they've served their purpose. Unfortunately this site does not have a good way to provide feedback to answers other than through comments which are limited. Stack Overflow has strict rules that answers should exclusively be answers and not replies. Commented Jul 16, 2019 at 21:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.