Hello everybody!
I’m trying to do an Insert query using:
idTabla = event.source.parent.idTablaMax
idTipoConsigna = event.source.parent.getComponent('cmbTipoConsigna').selectedValue
inicioTramo = event.source.parent.getComponent('txtInicioTramo').intValue
finTramo = event.source.parent.getComponent('txtFinTramo').intValue
cantidad = event.source.parent.getComponent('txtCantidad').intValue
if idTipoConsigna <= 0:
system.gui.messageBox ("Por favor, introduzca un Tipo de Consigna")
else:
system.db.runPrepUpdate("INSERT INTO precio (idTabla, cantidad, inicioTramo, finTramo, Instalacion_idTabla, TipoConsigna_idTabla) VALUES (?,?,?,?,?,?)", [idTabla, cantidad, inicioTramo, finTramo, '1', idTipoConsigna])
The arguments come from 3 numeric text field and my problem is that when I execute this script it doesn’t I enter the numeric text field values correctly. Does anybody know why this happen?
Thanks for your help!