跟find 一样的呀
你可以这样:
Dim cmd As New
SQLCommand
Dim nm As String = "贺辉"
cmd.ConnectionName = "User"
cmd.CommandText ="Sel ect Count(*) From {Users} Where Name =
'" & nm &
"'"
If cmd.ExecuteScalar > 0 Then
Messagebox.Show("已经存在同名用户","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
也可以这样
Dim cmd As New SQLCommand
Dim dt As
DataTable
cmd.CommandText = "SELE CT
DISTINCT 客户 From {订单}"
dt = cmd.ExecuteReader()
dim dr as datarow = dt.find('xxx")
if dr isnot nothing then
end if