I have an empty SQL table called Plt65_Supply_Room.
I want to create a user interface such that people can add new rows into my table.
How can i manage this?
Below code it what I have on my Configure events srcipt section on mouce click 'ENTER' Button.
Please help
def runAction(self, event):
ItemName = self.getSibling("Item Name").props.text
Department = self.getSibling("Department").props.text
Alias = self.getSibling("Alias").props.text
Notes = self.getSibling("Notes").props.text
Equipment = self.getSibling("Equipment").props.text
OEM_PN = self.getSibling("OEM PN").props.text
Shaw_PN = self.getSibling("Shaw PN").props.text
system.db.runPrepUpdate("INSERT INTO Plt65_Supply_Room ([Item_Name], [Department], [Alias], [Notes], [Equipment], [OEM PN], [Shaw PN]) Values(?,?,?,?,?)",[ItemName, Department, Alias, Notes, Equipment, OEM_PN, Shaw_PN])
self.getSibling("Item Name").props.text = ''
self.getSibling("Department").props.text = ''
self.getSibling("Alias").props.text = ''
self.getSibling("Notes").props.text = ''
self.getSibling("Equipment").props.text = ''
self.getSibling("OEM PN").props.text = ''
self.getSibling("Shaw PN").props.text = ''