SHARE
TWEET

Untitled

a guest Aug 12th, 2016 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pyodbc
  2.  
  3. dsn = 'sqlserverdatasource'
  4. user = '<username>'
  5. password = '<password>'
  6. database = '<dbname>'
  7.  
  8. con_string = 'DSN=%s;UID=%s;PWD=%s;DATABASE=%s;' % (dsn, user, password, database)
  9. cnxn = pyodbc.connect(con_string)
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