Foxtable(狐表)用户栏目专家坐堂 → [求助] sql数据库查询问题


  共有1516人关注过本帖平板打印复制链接

主题:[求助] sql数据库查询问题

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


加好友 发短信
等级:幼狐 帖子:137 积分:1175 威望:0 精华:0 注册:2020/9/28 9:41:00
[求助] sql数据库查询问题  发帖心情 Post By:2023/7/11 10:56:00 [只看该作者]

红色部份使用数字时能查询到,代入变量时就查询不到   
Dim cmd As New SQLCommand
cmd.C
Dim dt As DataTable
cmd.C ommandText = "S ELECT * From {tb_khrgtgxh} where f_nh = '2004'"  '"& lh &"'" 
dt = cmd.ExecuteReader(True)
For Each dr As DataRow In dt.DataRows
    ......
Next
dt.Save()
DataTables("tb_khrgtgxh").LoadFilter = "[f_nh] = '2004'"     '" & lh & "'"
DataTables("tb_khrgtgxh").Load()

 回到顶部