Foxtable(狐表)用户栏目专家坐堂 → [求助]sqlselect


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

主题:[求助]sqlselect

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


加好友 发短信
等级:五尾狐 帖子:1165 积分:8129 威望:0 精华:0 注册:2015/3/30 10:44:00
[求助]sqlselect  发帖心情 Post By:2016/3/17 12:55:00 [只看该作者]

Dim str As String
Dim id As Integer
id = user.name.IndexOf("@")
str = user.name.SubString(0,id)
Dim lts As List(of DataRow) = DataTables("盖楼").sqlSelect("回复者 like '%" & str & "%'  And 备注 Is Not null And 提交 = 0 ")
DataTables("盖楼").SQLUpdate(lts)
msgbox(0)
For Each lt As DataRow In lts
msgbox(1)
    lt("提交") = True
msgbox(2)
    e.Form.Controls("TextBox" & lt("_Identify")).ReadOnly = BooleanEnum.True
    e.Form.Controls("label2" & lt("_Identify")).text = Date.now
msgbox(3)
    lt.save
    lt.Locked = True
Next
DataTables("盖楼").SQLUpdate(lts)
怎么只执行到msgbox(0),for each为什么没执行?

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/3/17 14:29:00 [只看该作者]

没有进入循环,就是没有查询到数据。修改一下条件试试

 

Dim lts As List(of DataRow) = DataTables("盖楼").sqlSelect("")

msgbox(lts)

msgbox("回复者 like '%" & str & "%'  And 备注 Is Not null And 提交 = 0")

 

 


 回到顶部