delphi问题,急!!!!
来源:百度知道 编辑:UC知道 时间:2024/06/16 22:50:54
adoquery1.SQL.Add('insert into 决赛名单(number,name,runitem,sex) select number,name,runitem,sex from 运动员成绩 where runitem="'+combobox2.Text+'"');运行出现下面错误是怎么回事?
project project1.exe raised exception class eoleException with message'insert into 语句的语法错误.'.process stopped.use step or run to continue.
project project1.exe raised exception class eoleException with message'insert into 语句的语法错误.'.process stopped.use step or run to continue.
adoquery1.SQL.Add('insert into 决赛名单(number,name,runitem,sex) select 运动员成绩.number,运动员成绩.name,运动员成绩.runitem,运动员成绩.sex from 运动员成绩 where 运动员成绩.runitem="'+combobox2.Text+'"');
引号位置不对,改成这样
adoquery1.SQL.Add("'insert into 决赛名单(number,name,runitem,sex) select number,name,runitem,sex from 运动员成绩 where runitem='"+combobox2.Text+"'");