Foxtable(狐表)用户栏目专家坐堂 → [求助]用SQLCommand方式查找行


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

主题:[求助]用SQLCommand方式查找行

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


加好友 发短信
等级:超级版主 帖子:106298 积分:540619 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/8/13 8:40:00 [显示全部帖子]

Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "SELECT * F ROM {表} where 标题 = '" & e.sender.text & "'“
dt = cmd.ExecuteReader()
if dt.datartow.count= 0
msgbox("没有符合条件的数据")
else
msgbox("符合条件的数据有" & dt.datartow.count & “行”)
Dim dr As DataRow = dt.datartow(0) '表名称用全局变量
end if

 回到顶部