Foxtable(狐表)用户栏目专家坐堂 → 使用 ExecuteReader(True) 导致数据丢失


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

主题:使用 ExecuteReader(True) 导致数据丢失

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


加好友 发短信
等级:超级版主 帖子:112380 积分:572162 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/12/16 14:33:00 [显示全部帖子]

试试,如果还有问题,肯定不是这里代码的原因,检查其它代码

Dim t As Table   't为窗口查询表
t=e.Form.Controls("Table1").Table
Dim cmd As new SQLCommand
cmd
.ConnectionName = "aaa"
Dim
 dt As DataTable 
cmd
.CommandText = "S e l e c t * From {表A} Where [_Identify] Is not null"  '生成表
dt
 = c m d.ExecuteReader(True) '记得将参数设置为True

t.DataSource =dt
For Each dr As Row in t.Rows
  dr("标识") = True
Next
t.Save

 回到顶部