Mozirra
Mozirra

Reputation: 31

Where does pymssql get it's error codes from?

I'm curious as to where pymssql gets its error codes from.

If I get an OperationalError: (18456, "Login failed for user '***'.DB-Lib error message 18456, severity 14), I know that the 18456 comes from the sys.messages in MS SQL. However if I get an OperationalError: (20009, 'Net-Lib error during Connection refused'), I have no idea where the 20009 is coming from. In the sys.messages table I only see The article '%s' could not be added to the publication '%s'. for 20009

Upvotes: 0

Views: 329

Answers (1)

FlipperPA
FlipperPA

Reputation: 14331

According to the FreeTDS documentation:

If you get message 20009, remember you haven't connected to the machine. It's a configuration or network issue, not a protocol failure. Verify the server is up, has the name and IP address FreeTDS is using, and is listening to the configured port.

http://www.freetds.org/userguide/confirminstall.htm (Example 3-5) Good luck!

Upvotes: 1

Related Questions