Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. def btn_login_clicked(self):
  2. try:
  3. self.conn = pymssql.connect(host="DESKTOP-27N006P", user=self.auth.uiauth.line_login.text(),
  4. password=self.auth.uiauth.line_password.text(), database="Warehouses")
  5. self.conn.autocommit(True)
  6. if self.auth.uiauth.line_password.text() == "admin":
  7. self.fadmin = AdminForm(self.conn)
  8. self.auth.close()
  9. except pymssql.OperationalError:
  10. self.auth.uiauth.label_status.setText("Invalid login or password")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement