SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pymssql
  2.  
  3. db_host = "100.100.100.100:1433"
  4. db_name = "database"
  5. db_user = "username"
  6. db_pass = "password"
  7.  
  8. conn = pymssql.connect(host=db_host, user=db_user, password=db_pass)
  9.  
  10. ## gives:
  11.  
  12. Traceback (most recent call last):
  13.   File "dbtest.py", line 8, in <module>
  14.     conn = pymssql.connect(host=db_host, user=db_user, password=db_pass)
  15.   File "pymssql.pyx", line 456, in pymssql.connect (pymssql.c:6017)
  16.     raise InterfaceError(e[0])
  17. pymssql.InterfaceError: Connection to the database failed for an unknown reason.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top