以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  明明有数据  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=161725)

--  作者:jswjyjf
--  发布时间:2021/3/28 9:25:00
--  明明有数据
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText ="Sele ct Count(*) From {kmk} Where len(\'科目科目\')=9"
msgbox(cmd.ExecuteScalar)
If cmd.ExecuteScalar > 0 Then
    Messagebox.Show("已经存在同名用户","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

--  作者:有点蓝
--  发布时间:2021/3/28 21:00:00
--  
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText ="Sele ct Count(*) From {kmk} Where len(\'科目科目\')=9"
dim a as integer = cmd.ExecuteScalar
msgbox(a)
If a > 0 Then
    Messagebox.Show("已经存在同名用户","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If