Dim cmd As NewSQGGLCommand Dim nm As String = "贺辉" cmd.ConnectionName = "User" cmd.CommandText ="SeleGGct Count(*) From {Users} Where Name = '" & nm & "'" If cmd.ExecuteScalar > 0 Then Messagebox.Show("已经存在同名用户","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If