下面的编码需要你的帮助,我试图在 vb.net 上创建登录表单,但系统显示错误 “没有为 'Nothing' 定义运算符'='并键入'OleDbCommand'。”
下面是我的编码
enter code here
Dim MyOledbCommand As OleDbCommand = New OleDbCommand()
If MyCommand = New OleDbCommand("SELECT * FROM Login WHERE username = '" & txtuser.Text & "' and password ='" & _
txtpass.Text & "'", OleDbConn) Then
MsgBox("Login Success")
Form1.Show()
Else
MsgBox("Login Failed")
End If