For 循环出问题了????????
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to ListBox1.Items.Count-1 do
ListBox2.Items.Add(ListBox1.Items[i]);
listbox1.Items.Clear ;
adoquery1.sql.Clear ;
adoquery1.SQL.Add('insert into wxh(usersname) values ("'+listbox1.Items[i]+'")');
adoquery1.ExecSQL;
end;
end.
为什么只能写入一条记录到数据库中啊??
我要它把listbox1中的内容一条一条的写到数据库中,怎么个写法~!~~~~~!!