主题:[讨论]关于数据集过滤规则的设置
baoxuelan
[专家分:50] 发布于 2006-04-11 18:12:00
关于数据集过滤规则的设置!
请问:
table.filter:='sid='''+sid+'''';
'sid='''+sid+'''';这一行是什么意思!!!!
谢谢大虾了!!
回复列表 (共3个回复)
沙发
xiaojie381 [专家分:0] 发布于 2006-04-11 19:51:00
单引号数目不对吧!!!
板凳
baoxuelan [专家分:50] 发布于 2006-04-12 05:18:00
关于数据集过滤规则的设置!
请问:
table.filter:='sid='''+sid+'''';
'sid='''+sid+'''';这一行是什么意思!!!!
但引号的数目是正确的,并且实现了单个查询的功能就是不明白是什么意思
3 楼
baoxuelan [专家分:50] 发布于 2006-04-12 05:20:00
procedure TfrmMain.NACourseClick(Sender: TObject); //查询一门课程
var
cid:string;
begin
cid:='';
cid:=inputbox('课程查询','请输入要查询的课程编号','');
if cid<>''then
begin
label1.Caption:='课程编号为'''+cid+'''的情况';
table_c.Filter:='cid='''+cid+'''';;//过滤规则
table_c.Filtered:=true;
if table_c.recordcount=0 then
showmessage('查无此课');
end
else
showmessage('没有查询课程');
end;
完整代码!!!
我来回复