adotquery中如何实现添加?
代码如下:不能执行?
var bid1:integer;
name1,sex1,address1,phone1,job1,area1,photo1:string;
begin
adoquery1.close;
adoquery1.sql.clear;
adoquery1.sql.add('insert into lsgxx'+'(bid,name,sex,address,phone,job,area,photo)'
+ 'value'+'(:bid1,:name1,:sex1,:address1,:phone1,:job1,:area1,:photo1)')
(不执行处!)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
adoquery1.Parameters.ParamByName('bid1').Value:=strtoint(edit2.text);
adoquery1.Parameters.ParamByName('name1').Value:=edit3.Text;
adoquery1.Parameters.ParamByName('sex1').Value:=combobox2.Text;
adoquery1.Parameters.ParamByName('address1').Value:=edit4.Text;
adoquery1.Parameters.ParamByName('phone1').Value:=edit5.Text;
adoquery1.Parameters.ParamByName('job1').Value:=combobox4.Text;
adoquery1.Parameters.ParamByName('area1').Value:=combobox3.Text;
adoquery1.Parameters.ParamByName('photo1').Value:=nill;
adoquery1.Post;