Dim a As New SqlCommand
a.CommandText = "select * from User where ID=" & TextID.Text & "And PassWord = "& TextPassWord.Text
a.Connection = Me.SqlConnection1
Dim cmd As SqlDataReader
Me.SqlConnection1.Open()
cmd = a.ExecuteReader
If (cmd.Read) Then
MsgBox("有这条数据", , "")
Else
MsgBox("没有这条数据", , "")
End If
Me.SqlConnection1.Close()
程序运行带绿色处无法响应
[此贴子已经被作者于2007-7-8 23:42:06编辑过]