Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from django.http import HttpResponse
  2.  
  3. import pymssql
  4. conn = pymssql.connect(server='chnu-euniversity.database.windows.net', user='euniversity@chnu-euniversity', password='Chnufmi401', database='Euniversity.Database')
  5.  
  6. cursor = conn.cursor()
  7. cursor.execute('SELECT * FROM dom.Gender;')
  8.  
  9. response = cursor.fetchall()
  10.  
  11. def index(request):
  12. return HttpResponse(response)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement