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;

解决方案 »

  1.   

    报什么错误
    values前加空格
      

  2.   

    就这么一个SQL语句,你发了多少帖子了,现在还没搞定
      

  3.   

      sql :='Insert into 相关配置(目标路径,文件名,打包形式)values('''+u+''','''+p +''','+combobox1.Text+')';
      

  4.   

    不是那个问题是重复值怎么判断不出来。
    忘了说了。SQL语句对着呢是刚开始忘了写一句话form1.ADOQuery1.ExecSQL;
    但是,不知道怎么了,判断重复好像没有执行啊
      

  5.   

    没看见这次发的不是一句话吗?不是刚开始用delphi吗,有好多问题。