Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.39 KB | None | 0 0
  1. def Create():
  2.  
  3.     while(True):
  4.  
  5.         while(True):
  6.             try:
  7.                 client = raw_input("Use ADC or CDS? : ")
  8.  
  9.                 if client.lower() == "cds":
  10.                     connection = pymssql.connect("data.test.cds", "TestCds_hserve_user", "jRb3ZmslcXdjFbyA#",
  11.                                                  "TestCDSTicketing")
  12.                 if client.lower() == "adc":
  13.                     connection = pymssql.connect("data.test.adc", "TestAdc_hserve_user", "236c605a69356664",
  14.                                                  "TestAdcTicketing")
  15.  
  16.                 cursor = connection.cursor()
  17.                 break
  18.  
  19.             except:
  20.                 print errorMessage
  21.  
  22.         seriesCode = raw_input("Enter serie's code: ")
  23.  
  24.         while (True):
  25.             try:
  26.                 cursor.execute(sqlFindIssKey % seriesCode)
  27.                 isskey = cursor.fetchall()
  28.                 break
  29.             except:
  30.                 print "Oups! Looks like there were an error! Please try again!"
  31.  
  32.         isskey_copy = raw_input("From which Frozen Attributes would you like to update? (enter isscode please): ")
  33.  
  34.  
  35.         try:
  36.             for data in isskey:
  37.                 cursor.execute(sqlUpdateFrAt % isskey_copy, data)
  38.                 break
  39.         except:
  40.             print "No Frozen Attributes were updated. Maybe there were a mistakes. Please start over."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement