以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  为什么这句 显示永远都是找不到  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=124105)

--  作者:kennypalm
--  发布时间:2018/8/30 18:29:00
--  为什么这句 显示永远都是找不到
Dim dr As DataRow
 \'With DataTables("customer")
 \'dr = .Find("customer_card_no = \'55554444\'","primary_key asc") 
\'End With


dr = DataTables("customer").Find("customer_card_no=\'55554444\'  ")

If dr IsNot  Nothing Then \'如果找到的话

      messagebox.Show ("Name :" & dr("customer_cname") )
      messagebox.Show  ("Number  : " & dr("customer_card_no"))

        Else

      messagebox.Show (" Not found ") 

End If


为什么这句 显示永远都是找不到 not found ?
 
资料库内 有 资料的
图片点击可在新窗口打开查看此主题相关图片如下:sp20180830_183015.png
图片点击可在新窗口打开查看




--  作者:y2287958
--  发布时间:2018/8/30 19:32:00
--  
表名正确吗
--  作者:有点甜
--  发布时间:2018/8/30 20:56:00
--  

试试

 

Dim dr As DataRow
dr = DataTables("customer").Find("customer_card_no like \'55554444%\'")
If dr IsNot  Nothing Then \'如果找到的话
      messagebox.Show ("Name :" & dr("customer_cname") )
      messagebox.Show  ("Number  : " & dr("customer_card_no"))
Else
      messagebox.Show (" Not found ") 
End If
 
或者试试
 
Dim dr As DataRow
dr = DataTables("customer").sqlFind("customer_card_no like \'55554444%\'")
If dr IsNot  Nothing Then \'如果找到的话
      messagebox.Show ("Name :" & dr("customer_cname") )
      messagebox.Show  ("Number  : " & dr("customer_card_no"))
Else
      messagebox.Show (" Not found ") 
End If

--  作者:kennypalm
--  发布时间:2018/8/30 21:04:00
--  
  需要用   .sqlFind  用 find 不能找到已更新最新的资料 , 请问一下 ,怎样在找之前自动同步一下表 ("customer") 谢谢
--  作者:有点甜
--  发布时间:2018/8/30 21:04:00
--  
以下是引用kennypalm在2018/8/30 21:04:00的发言:
  需要用   .sqlFind  用 find 不能找到已更新最新的资料 , 请问一下 ,怎样在找之前自动同步一下表 ("customer") 谢谢

 

看看

 

http://www.foxtable.com/webhelp/scr/1928.htm

 


--  作者:kennypalm
--  发布时间:2018/8/30 21:05:00
--  
正确的 ,找到原因了, 是因为 没有foxtable 没有自动同步表
--  作者:有点甜
--  发布时间:2018/8/30 21:05:00
--  
以下是引用kennypalm在2018/8/30 21:04:00的发言:
  需要用   .sqlFind  用 find 不能找到已更新最新的资料 , 请问一下 ,怎样在找之前自动同步一下表 ("customer") 谢谢

 

看看

 

http://www.foxtable.com/webhelp/scr/1928.htm