with fdm.q1 do
begin
Close;
SQL.Clear;
SQL.Add(' INSERT INTO k_Purchase '+
' (User_No,'+
' Trade_Type,'+
' Purchase_Num,'+
' Remains_Gas,'+
' Purchase_Vol,'+
' Trade_Date,'+
' Over_Zero,'+
' gas_RMB,'+
' B_Status,'+
' Operator_No,'+
' Total_Purchase,'+
' Total_Used,'+
' reg_RMB,'+
' checkout)'+
' VALUES
SQLuserno,'+
' :SQLtradetype,'+
' :SQLpurchasenum,'+
'
ar,'+
' :SQLpurchasevol,'+
' :SQLTradedate,'+
'
ar1,'+
' :SQLgasrmb,'+
'
ar2,'+
' :SQLoperatorno,'+
' :SQLtotalpurchase,'+
'
ar3,'+
' 0,'+
' 0)');
prepare;
params[0].AsString := inttostr(User_No);
params[1].AsString := SQLtradetype;
params[2].AsString := inttostr(UserBuyNum);
params[3].AsString := LPBsyql;
params[4].AsString := trim(edit10.text);
params[5].AsString := FormatDateTime('yyyy-mm-dd',now);
params[6].AsString := LPBglql;
params[7].AsCurrency := strtofloat(trim(edit13.text));
params[8].AsString := '1';
params[9].AsString := SQLoperatorno;
params[10].AsString := inttostr(usertotalbuy + strtoint(edit10.text));
params[11].AsString := LPByyql;
ExecSQL;
Close;