关于table1的filter属性(50分)

  • 主题发起人 主题发起人 宝宝龙
  • 开始时间 开始时间

宝宝龙

Unregistered / Unconfirmed
GUEST, unregistred user!
temp:=dbgrid1.Fields[0].AsString;
table2.Filtered:=true;
table2.Filter:='Bh='+temp;
table2.Active:=true;
dbgrid1通过table1连接数据库表sted.db
打算单击dbgrid时,在dbedit内显示数据,通过table2连接数据库表sted.db使用了上面的问题,
但运行时
提示:table2:field 'a003' not found'
但通过调试,在第三步形成了table2.Filter:='Bh=a003'
且表中明明有这记录为什么还报上面的错误
 
table2.Filter:='Bh='''+temp+'''';
 
接受答案了.
 
table2.Filter:='Bh='''+temp+'''';
您能不能帮我解释一下它的引号作用
引号太多了,都不知道怎么来得
 
字符串,两个''表示一个。
 
[brown]' [/brown]Bh= ' [red]''+temp+'' [/red][blue]' [/blue] [brown][blue]'[/blue][/brown]
 

Similar threads

S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
927
SUNSTONE的Delphi笔记
S
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
后退
顶部