在窗口上放一TADOQuery控件,名字为qry在其SQL属性中写入下面的语句:
INSERT INTO modify_tb(old_company, old_kj, old_line, old_checkday, old_jx,old_fx,new_company,
new_kj, new_line, new_checkday, new_jx,new_fx,lib,edit_date,start_date)
VALUES (:pp1,:pp2,:pp3,:pp4,:pp5,:pp6,:pp7,:pp8,:pp9,:pp10,:pp11,:pp12,:pp13,:pp14,:pp15)
在程序中为参数赋值如下:
qry.Close;
  qry.Parameters.ParamByName('pp1').Value :=trim(com1.text);
  qry.Parameters.ParamByName('pp2').Value:=trim(kj1.text);
  qry.Parameters.ParamByName('pp3').Value:=trim(ln1.text);
  qry.Parameters.ParamByName('pp4').Value:=trim(chd1.text);
  qry.Parameters.ParamByName('pp5').Value:=trim(jx1.text);
  qry.Parameters.ParamByName('pp6').Value:=trim(fx1.text);
  qry.Parameters.ParamByName('pp7').Value:=trim(cm2.text);
  qry.Parameters.ParamByName('pp8').Value:=trim(kj2.text);
  qry.Parameters.ParamByName('pp9').Value:=trim(ln2.text);
  qry.Parameters.ParamByName('pp10').Value:=trim(chd2.text);
  qry.Parameters.ParamByName('pp11').Value:=trim(jx2.text);
  qry.Parameters.ParamByName('pp12').Value:=trim(fx2.text);
  qry.Parameters.ParamByName('pp13').Value:=trim(flogin.edit1.text);
  qry.Parameters.ParamByName('pp14').Value:=tt1;
  qry.Parameters.ParamByName('pp15').Value:=dp1.DateTime;
  qry.ExecSQL;
数据表modify_tb字段长度定义的足够长,可为什么执行以上语句后,查看modify_tb表发现有些字符类型的字段插入的不完全。如****有电子有限公司,可能只有****?