Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import pymssql
  2.  
  3. server = 'hostname.domainname'
  4. database = 'mydb'
  5. username = 'myuser'
  6. password = 'mypass'
  7.  
  8. conn = pymssql.connect(server, username, password, database)
  9. cursor = conn.cursor(as_dict=True)
  10. cursor.execute('select 6 * 7 as [Result];')
  11. for row in cursor:
  12. print row['Result']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement