Client can not save data but in ignition design it saved

Has anyone experience this problem that client can not save the data but when I tested it on the ignition design it saved the data correctly?

I tried to add an entry in OOS Technician Log using the client system, after entering this action taken, it doesn’t save, but when I tested it on the ignition design it save. Does anyone one know the conflict in client and ignition design?


save what data?

just the text in the database

post your script so people can help.

here it is thanks in advance

p.s it works before the suddenly we encountered the problem. is there any problem in client timing?

[code]import sys

data = system.dataset.toPyDataSet(event.source.tbTechData)
Technicians = 0
Technicians_IDs = “”

for row in data:
if row[“Selected”] == 1:
Technicians = Technicians + 1

if Technicians == 0:
system.gui.messageBox(“You must select at least one technician.”)
elif event.source.parent.getComponent(‘txtActionTaken’).text == ‘’:
system.gui.messageBox(“You must enter a action taken for this record.”)
for row in data:
if row[“Selected”] == 1:
if Technicians_IDs != “”:
Technicians_IDs = Technicians_IDs + ", " + str(row[“Technician_ID”])
Technicians_IDs = str(row[“Technician_ID”])

OOS_Tech_Log_ID = event.source.parent.OOS_Tech_Log_ID
Line_ID = event.source.parent.Line_ID
Machine_ID = event.source.parent.Machine_ID
Variable_ID = event.source.parent.Variable_ID
OOS_IDs = event.source.parent.OOS_IDs
OOS_Type = event.source.parent.OOS_Type
Root_Cause = event.source.parent.Root_Cause
#Root_Cause = event.source.parent.getComponent(‘txtRootCause’).text
Action_Taken = event.source.parent.Action_Taken
#Action_Taken = event.source.parent.getComponent(‘txtActionTaken’).text
Tech_Start_DT = event.source.parent.Start_Date
Tech_End_DT = event.source.parent.Completed_Date
Completed = event.source.parent.Completed

#Insert/Update record into Maintenance_Calls
call = system.db.createSProcCall(“usp_OOS_Tech_Log_Action_Copy”)
call.registerInParam(1, system.db.VARCHAR, OOS_Tech_Log_ID ) #OOS_Tech_Log_ID
call.registerInParam(2, system.db.TINYINT, Line_ID) #Line_ID
call.registerInParam(3, system.db.TINYINT, Machine_ID) #Machine_ID
call.registerInParam(4, system.db.INTEGER, Variable_ID) #Variable_ID
call.registerInParam(5, system.db.VARCHAR, OOS_IDs) #OOS_IDS
call.registerInParam(6, system.db.VARCHAR, OOS_Type) #OOS_Type
call.registerInParam(7, system.db.VARCHAR, Root_Cause) #Root_Cause
call.registerInParam(8, system.db.VARCHAR, Action_Taken) #Action_Taken
call.registerInParam(9, system.db.TIMESTAMP, Tech_Start_DT) #Tech_Start_DT
call.registerInParam(10, system.db.TIMESTAMP, Tech_End_DT) #Tech_End_DT
call.registerInParam(11, system.db.BOOLEAN, Completed) #Completed
call.registerInParam(12, system.db.VARCHAR, Technicians_IDs)

system.gui.messageBox(“Record has been saved.”)
event.source.parent.Action_Taken = “”
#event.source.parent.getComponent(‘txtActionTaken’).text = “”
#event.source.parent.getComponent(‘txtRootCause’).text =""
event.source.parent.Root_Cause = “”
Previous_Window = event.source.parent.Previous_Window
window = system.gui.getWindow(Previous_Window)
table = window.getRootContainer().getComponent(‘Table’)
table_bit = window.getRootContainer().getComponent(‘Table_Bit’)
system.db.refresh(table, “data”)
system.db.refresh(table_bit, “data”)


there is an error after publishing this window
Exception: Error running query:
SQLQuery(query=EXEC usp_OOS_History_Get_Copy
‘2016-06-02 00:00:00’,
‘’, database=)@5000ms
On: OOS_List.Root
caused by GatewayException: Connection Error: The database connection ‘PMON’ is FAULTED. See Gateway Status for details.
caused by FaultedDatabaseConnectionException: The database connection ‘PMON’ is FAULTED. See Gateway Status for details.

That error tells us the DB connection in the gateway is faulted. You can go to the gateway homepage via your web browser and select status database connections and there should be a fault listed if the connection is still faulted. What is the fault?