Foxtable(狐表)用户栏目专家坐堂 → [求助]初学者求助,请各位大大帮忙看下


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

主题:[求助]初学者求助,请各位大大帮忙看下

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


加好友 发短信
等级:狐神 帖子:6708 积分:34304 威望:0 精华:11 注册:2012/8/18 23:10:00
  发帖心情 Post By:2012/9/20 14:46:00 [只看该作者]

 比如这样写

Dim txt1 As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim txt2 As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim count As Integer
Dim cmd As New SQLCommand
'cmd.C
cmd.CommandText = "Select Count(*) From {表名} where 列名 = '" & txt1.Text & "'"  
count = cmd.ExecuteScalar()

txt2.Text = count

 回到顶部