SaveQuery.SQL.Add('INSERT INTO work_sp');
SaveQuery.SQL.Add('VALUES (last_insert_id(),:ES_Index, :fdate, :customer_es_name, :ASMI_Operator, :operator_phone,'); {6}
SaveQuery.SQL.Add(':srb_doc, :Satellite, :SatLongitude, :ChooseTP, :Co_Up_pol, :CX_tp, :Cx_Up_pol, :Station_Own,'); {8}
SaveQuery.SQL.Add(':User_Operator, :User_Cont_Phone, :ES_location, :ES_latitude, :ES_longitude, :Ant_Diameter,'); {6}
SaveQuery.SQL.Add(':Ref_Station, :F_up, :F_dn, :CO_EIRP_f, :CPI_es_f, :sp, :frq, :eirp, :comment, :Pot_f, :Pxt_f, :Por_f,'); {12}
SaveQuery.SQL.Add(':Pxr_f, :G_CO_Max, :Got_f, :Gor_f, :Gxt_f, :Gxr_f, :Gxtx_f, :CPIsum_f, :CPIsat_f, :descr_cust'); {10}
SaveQuery.SQL.Add(':City_Full_f, :begtime, :endTime, :SpentTime, :F_Centre, :BW, :st_co, :st_cx);'); {8}
SaveQuery.ParamByName('ES_Index').asString := ES_Index.Text;
SaveQuery.ParamByName('fdate').asDateTime := StrToDateTime(Date_Time.Text); // depending if Date_Time has a Date property or is just text
SaveQuery.ParamByName('customer_es_name').asString := customer_es_name.Text;
SaveQuery.ParamByName('ASMI_Operator').asString:=ASMI_Operator.Text;
SaveQuery.ParamByName('operator_phone').asString:=operator_phone.Text; {5}
SaveQuery.ParamByName('srb_doc').asString:=srb_doc.Text;
SaveQuery.ParamByName('Satellite').asString:=Satellite.Text;
SaveQuery.ParamByName('SatLongitude').asFloat:=StrToFloatDef(SatLongitude.Text,12);
SaveQuery.ParamByName('ChooseTP').asString:=ChooseTP.Text;
SaveQuery.ParamByName('Co_Up_Pol').asString:=Co_Up_pol.Text;
SaveQuery.ParamByName('CX_tp').asString:=CX_tp.Text;
SaveQuery.ParamByName('Cx_Up_pol').asString:=Cx_Up_pol.Text;
SaveQuery.ParamByName('Station_Own').asString:=Station_Own.Text; {8}
SaveQuery.ParamByName('User_Operator').asString:=User_Operator.Text;
SaveQuery.ParamByName('User_Cont_Phone').asString:=User_Cont_Phone.Text;
SaveQuery.ParamByName('ES_location').asString:=ES_location.Text;
SaveQuery.ParamByName('ES_Latitude').asFloat:=StrToFloatDef(ES_latitude.Text,12);
SaveQuery.ParamByName('ES_Longitude').asFloat:=StrToFloatDef(ES_longitude.Text,12);
SaveQuery.ParamByName('Ant_Diameter').asFloat:=StrToFloatDef(Ant_Diameter.Text,12); {6}
SaveQuery.ParamByName('Ref_Station').asString:=Ref_Station.Text;
SaveQuery.ParamByName('F_up').asFloat:=StrToFloatDef(F_up.Text,12);
SaveQuery.ParamByName('F_dn').asFloat:=StrToFloatDef(F_dn.Text,12);
SaveQuery.ParamByName('CO_EIRP_f').asFloat:=StrToFloatDef(CO_EIRP_f.Text,12);
SaveQuery.ParamByName('CPI_es_f').asFloat:=StrToFloatDef(CPI_es_f.Text,12);
SaveQuery.ParamByName('sp').asString:=sp;
SaveQuery.ParamByName('frq').asString:=frq;
SaveQuery.ParamByName('eirp').asString:=eirp;
SaveQuery.ParamByName('comment').asString:=Comment.Text;
SaveQuery.ParamByName('Pot_f').asFloat := StrToFloatDef(Pot_f.Text,12); // or StrToFloatDef if Text can be empty or invalid)
SaveQuery.ParamByName('Pxt_f').asFloat := StrToFloatDef(Pxt_f.Text,12);
SaveQuery.ParamByName('Por_f').asFloat := StrToFloatDef(Por_f.Text,12); {12}
SaveQuery.ParamByName('Pxr_f').asFloat := StrToFloatDef(Pxr_f.Text,12);
SaveQuery.ParamByName('G_CO_Max').asFloat := StrToFloatDef(G_CO_Max.Text,12);
SaveQuery.ParamByName('Got_f').asFloat := StrToFloatDef(Got_f.Text,12);
SaveQuery.ParamByName('Gor_f').asFloat := StrToFloatDef(Gor_f.Text,12);
SaveQuery.ParamByName('Gxt_f').asFloat := StrToFloatDef(Gxt_f.Text,12);
SaveQuery.ParamByName('Gxr_f').asFloat := StrToFloatDef(Gxr_f.Text,12);
SaveQuery.ParamByName('Gxtx_f').asFloat := StrToFloatDef(Gxtx_f.Text,12);
SaveQuery.ParamByName('CPIsum_f').asFloat := StrToFloatDef(CPIsum_f.Text,12);
SaveQuery.ParamByName('CPIsat_f').asFloat := StrToFloatDef(CPIsat_f.Text,12);
SaveQuery.ParamByName('descr_cust').asString:=descr_cust.Text; {10}
SaveQuery.ParamByName('City_Full_f').asString:=City_Full_f.Text;
SaveQuery.ParamByName('begtime').asTime:=BegTime.Time;
SaveQuery.ParamByName('endTime').asTime:=EndTime.Time;
SaveQuery.ParamByName('SpentTime').asFloat:=StrToFloatDef(SpentTime.Text,12);
SaveQuery.ParamByName('F_Centre').asFloat:=StrToFloatDef(F_Centre.Text,12);
SaveQuery.ParamByName('BW').asFloat:=StrToFloatDef(BW.Text,12);
SaveQuery.ParamByName('st_co').asString := st_co;
SaveQuery.ParamByName('st_cx').asString := st_cx; {8}
SaveQuery.ExecSQL;
SQLTransaction.Commit;