这个问题总是反复出现
如:FORM1.SQL.Add('select * from 教工基本信息表 where 部门="master office"');
就提示:列名"master office"无效
怎么回事啊?
如:FORM1.SQL.Add('select * from 教工基本信息表 where 部门="master office"');
就提示:列名"master office"无效
怎么回事啊?
调试欢乐多
的话好象没什么大问题。
该为
Query1.SQL.Add('select * from 教工基本信息表 where 部门=''master office''')
另外建议 表名和字段名读不要用中文!
修改
select * from 教工基本信息表 where 部门=:para
而后代入参数;
或是
你的“部门”字段修改为“bm”试试。
改为:
var
ssql: string;
begin
ssql := 'select * from 教工基本信息表 where 部门='+#39+'master office'+ #39;
form1.sql.clear;
form1.sql.add(ssql);
......
end;
OK了。不要用中文表格和中文字段。