if form1.ADOQuery1.IsEmpty then
begin
form1.ADOQuery1.Close;
form1.ADOQuery1.SQL.Clear;
form1.ADOQuery1.SQL.Add('Insert into 相关配置(目标路径,文件名,打包形式)values('''+u+''','''+p +''','''+combobox1.Text+''')');
form1.combobox1.Items.Add(u);
form1.ADOQuery1.ExecSQL;
form1.ADOQuery1.Open;
end
else
begin
application.messagebox('用户名已经存在,欢迎再次使用!','提示信息',mb_ok);
form2.Close;
end;
begin
form1.ADOQuery1.Close;
form1.ADOQuery1.SQL.Clear;
form1.ADOQuery1.SQL.Add('Insert into 相关配置(目标路径,文件名,打包形式)values('''+u+''','''+p +''','''+combobox1.Text+''')');
form1.combobox1.Items.Add(u);
form1.ADOQuery1.ExecSQL;
form1.ADOQuery1.Open;
end
else
begin
application.messagebox('用户名已经存在,欢迎再次使用!','提示信息',mb_ok);
form2.Close;
end;
values前加空格
忘了说了。SQL语句对着呢是刚开始忘了写一句话form1.ADOQuery1.ExecSQL;
但是,不知道怎么了,判断重复好像没有执行啊