Topic: [SOLVED] '''' is not a valid integer value
Hello friends,
I have the following script. When i run it the first time, everything works perfectly, however when i close the form and try to open another record it gives me the following error:
Error:
Attached image
Script:
var
amountofdays: integer;
begin
amountofdays:= SQLExecute('SELECT paymentterm FROM client WHERE id='+ IntToStr(frmAddInvoice.ComboBox2.dbItemID) );
if amountofdays = 0
then
amountofdays:= 8;
frmAddInvoice.DateTimePicker2.DateTime := frmAddInvoice.DateTimePicker1.DateTime + amountofdays;
frmAddInvoice.Edit4.Text := IntToStr(amountofdays);
end;
Could somebody point out what i am doing wrong?