主题:表的问题?
wy112112112
[专家分:240] 发布于 2009-05-20 09:25:00
ss1=alltrim(thisform.text1.value)
?vartype(ss1)
thisform.grid1.recordsource=;
"select * from 表1 where 字段1 like "%"+ss1+"%" into cursor s1"
*为什么不对?
回复列表 (共4个回复)
沙发
qjbzjp [专家分:8830] 发布于 2009-05-20 10:16:00
thisform.grid1.RecordSourceType= 4
thisform.grid1.recordsource=;
'select * from 表1 where 字段1 like "%"+ss1+"%" into cursor s1 '
句子中间有 " 了,所以句子两边只可用 '
板凳
wy112112112 [专家分:240] 发布于 2009-05-20 14:24:00
是不是不对呀,哪里错了
3 楼
qjbzjp [专家分:8830] 发布于 2009-05-20 22:22:00
句子中间有双引号 " 了,所以句子两边只可用单引号 '
4 楼
Ilikefox [专家分:5770] 发布于 2009-05-23 22:17:00
thisform.grid1.recordsource=;
"select * from 表1 where 字段1 like "%"+ss1+"%" into cursor s1"
呵呵,这个当然不对。应该是
thisform.grid1.recordsource=;
'select * from 表1 where 字段1 like "%' +ss1+ '%" into cursor s1'
或者用中括号更清晰
thisform.grid1.recordsource=;
[select * from 表1 where 字段1 like "%] + ss1+ [%" into cursor s1]
1楼qjbzjp的回答也是错的。
我来回复