gundemon85
路人甲
路人甲
  • 注册日期2007-02-24
  • 发帖数1
  • QQ
  • 铜币105枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:941回复:0

求助

楼主#
更多 发布于:2007-06-10 15:45
<P>本人用VB+MAPX做毕业设计,范围查询代码如下:</P>
<P>Dim i As Integer<BR>    i = searchResultsList.ListIndex<BR>    Dim id As String<BR>    <BR>    WhereID = "select * from xjh1 where MAPINFOID in ('"<BR>    For j = 0 To searchResultsList.ListCount - 1<BR>        id = searchResultsList.List(j)<BR>        If j <= searchResultsList.ListCount - 2 Then<BR>            WhereID = WhereID + id + "','"<BR>        End If<BR>        If j = searchResultsList.ListCount - 1 Then<BR>            WhereID = WhereID + id + "')"<BR>        End If<BR>        <BR>    Next<BR>    <BR>    id = searchResultsList.List(i)</P>
<P>    strSQL = WhereID<BR>   <BR>   <BR>    <BR>    If searchResultsList.ListCount > 0 Then<BR>    <BR>      test_ado.RecordSource = strSQL<BR>     test_ado.Refresh<BR>    Else<BR>       MsgBox ("对不起,没有你没有选择有效的地点!")<BR>      <BR>    End If<BR>End Sub<BR>可是查询时总是有错误,望达人解答下</P>
喜欢0 评分0
游客

返回顶部