我IP 库里有如下的一些记录
192.168.1.5
192.168.1.6
192.168.3.35
192.168.4.55
192.168.1
192.168.6比如我获取的IP,192.168.1.17select * from IP where IP =  '" & Text1.Text & "'or IP LIKE  '" & Text1.Text & "'请问这个LIKE语句要怎么写的。。

解决方案 »

  1.   

    sql = "select * from IP where IP like '" & Text1.Text & "%'"
      

  2.   


    你没有先打开数据集啊
    要先open啊
      

  3.   

    select * from ip where ip like '"& text1.text &"%' 试试。
      

  4.   


    select * from DON_IP where IP =  '" & Text1.Text & "' or ip like '" & Text1.Text & "%'
    无错,但是没有效果了。
    我在库里加了,120.32.230
    我的IP 120.32.230.224
      

  5.   

    ip like '" & Me.Text1 & "%'"
      

  6.   

    sql = "select * from IP where IP like '" & Text1.Text & "_%'" 
      

  7.   

    sql = "select * from IP where IP like '%,%'"
      

  8.   

    select * from DON_IP where IP =  '" & Text1.Text & "' or ip like '" & Text1.Text & "%' 
    无错,但是没有效果了。 
    我在库里加了,120.32.230 
    我的IP 120.32.230.224 
      

  9.   

    "select * from DON_IP where ip like '%" & trim(Text1.Text) & "%'"