for I := 0 to edtZjfs.Items.Count - 1 do
begin
if edtZjfs.checked[i] then
begin
if R.Zjfsstr1 = '' then
R.Zjfsstr1 := '''' + Trim(edtZjfs.Items.Strings[i]) + ''''
else
R.Zjfsstr1 := R.Zjfsstr1 + ',' + '''' + Trim(edtZjfs.Items.Strings[i]) + '''';
end;
end;edtZjfs是CheckedComboBox控件需要取多个增加方式的值来进行查询,SQL语句是 select * from a where zjfs in (R.zjfsstr1)
可是选两个数据的时候是可以的,如果选中三个的话,会出现select *from a where zjfs in ('购买','赠送','政府?
想请教一下是怎么回事,急,谢谢各位了。
begin
if edtZjfs.checked[i] then
begin
if R.Zjfsstr1 = '' then
R.Zjfsstr1 := '''' + Trim(edtZjfs.Items.Strings[i]) + ''''
else
R.Zjfsstr1 := R.Zjfsstr1 + ',' + '''' + Trim(edtZjfs.Items.Strings[i]) + '''';
end;
end;edtZjfs是CheckedComboBox控件需要取多个增加方式的值来进行查询,SQL语句是 select * from a where zjfs in (R.zjfsstr1)
可是选两个数据的时候是可以的,如果选中三个的话,会出现select *from a where zjfs in ('购买','赠送','政府?
想请教一下是怎么回事,急,谢谢各位了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货