Foxtable(狐表)用户栏目专家坐堂 → 关于连接 SQL 数据,使用的时候 数据同步更新的问题?


  共有10402人关注过本帖树形打印复制链接

主题:关于连接 SQL 数据,使用的时候 数据同步更新的问题?

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251060 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/8/14 18:01:00 [显示全部帖子]

参考:

http://www.foxtable.com/help/topics/2276.htm

 

最好看看Foxtable开发指南中关于动态加载的这一章的全部内容。


 回到顶部
帅哥哟,离线,有人找我吗?
狐狸爸爸
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251060 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/8/15 9:04:00 [显示全部帖子]

两种方法

 

用追载:

 

Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("窗口4_Table1")
tbl.DataTable.AppendLoad("条件")
If txt = "" Then
    tbl.Filter =" leveal=2 and deleted=0 and isstop=0"
    tbl.Sort = "pfullname desc,Standard desc,Unit1 desc"

Else
    txt = "'*" & txt & "*'"
    tbl.filter = "(pfullname Like " & txt & " Or Standard Like " & txt & " Or Unit1 Like " &  txt & ") and (leveal=2 and deleted=0 and isstop=0)"
    tbl.Sort = "pfullname desc,Standard desc,Unit1 desc"
End If

 

用加载:

 

Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("窗口4_Table1")

Dim Filter As string

Dim Sort AS string
If txt = "" Then
       Filter =" leveal=2 and deleted=0 and isstop=0"
       Sort = "pfullname desc,Standard desc,Unit1 desc"

Else
       txt = "'%" & txt & "%'"   '这里用%,不是*
      filter = "(pfullname Like " & txt & " Or Standard Like " & txt & " Or Unit1 Like " & txt & ") and (leveal=2 and deleted=0 and isstop=0)"
      Sort = "pfullname desc,Standard desc,Unit1 desc"
End If

tbl.DataTable.LoadFilter = Filter

tbl.DataTable.Load

tbl.sort = sort


 回到顶部