阅读:3742回复:12
[求助]我在用searchexpression时的问题?
<P>我在查找时,明明属性数据库中有的数据为什么用searchexpression查不出来?</P>
<P>比如:</P> <P>Set recs =map1.Layers(0).SearchExpression(Text1.text)</P> <P>结果出来,没有记录,怎么回事?</P> <img src="images/post/smile/dvbbs/em08.gif" /><img src="images/post/smile/dvbbs/em08.gif" /> |
|
|
1楼#
发布于:2004-09-10 15:49
你在帮助里看看<b>searchexpression,有例子的</b>
|
|
|
2楼#
发布于:2004-09-13 08:41
Text1.text中的表达式要符合SQL语法。
|
|
|
3楼#
发布于:2004-09-14 08:09
是没有记录还是没画出来?
|
|
4楼#
发布于:2004-09-14 08:44
recs.Eof为真还是为假?
|
|
|
5楼#
发布于:2004-09-14 08:54
是没有记录,recs.count=-1, 现在还没有解决!
|
|
|
6楼#
发布于:2004-09-14 22:32
<P>你加上 order by 应该就可以了的 </P><P> field = '2' order by field </P>
|
|
7楼#
发布于:2004-09-15 10:00
text1.text通常是个数值吧,但是serachExpression后面的参数是个表达式,如:id>100
|
|
8楼#
发布于:2004-09-17 10:58
<P>recs.count=-1并不表示没有记录返回</P><P>你可以看看mo的参考里面对count这个属性有详细的解释</P><P>The Count property may return a value of -1 when the object is a Recordset derived from sources which do not contain header information such as:</P><P>1.an SDE layer
2.a Table object 3.a SearchExpression</P><P>In these cases, to obtain the correct Count of the Recordset, a Statistics object should be created from the Recordset, and the number of records taken from the Count property of this Statistics object.</P> |
|
9楼#
发布于:2004-09-20 09:04
<P>谢谢大家,解决了该问题。</P>
|
|
|
上一页
下一页