Ejemplo n.º 1
0
# dbStatus = cust.updateCust(con,cust.CustID)
# if dbStatus == True:
#     print('Updated Successfully')
# else:
#     print('Error:', cust.error)
#
# exit()

# Create new customer
print("Inserting Customer")
cust.surname = "Glanville"
cust.firstname = "Nick"
cust.emailAddr = "*****@*****.**"
#cust.emailAddr = ""
cust.gender = "F"
cust.countryCode = "NZL"
cust.phone = "0274345288"
cust.dob = "1999-12-03"
if cust.insertCust(con):
    print("Customer inserted OK")
else:
    print(cust.error)
exit()

# # Reading Customer now returns rows
# print("reading customer .....")
(dbStatus, custRow) = cust.readCust(con, 2)
if (dbStatus == True):
    print(cust.emailAddr)
    print(cust.dob)
#    print(custRow["surname"])