以下这里有错误:
公司主营业务:做网站、网站制作、移动网站开发等业务。帮助企业客户真正实现互联网宣传,提高企业的竞争能力。成都创新互联是一支青春激扬、勤奋敬业、活力青春激扬、勤奋敬业、活力澎湃、和谐高效的团队。公司秉承以“开放、自由、严谨、自律”为核心的企业文化,感谢他们对我们的高要求,感谢他们从不同领域给我们带来的挑战,让我们激情的团队有机会用头脑与智慧不断的给客户带来惊喜。成都创新互联推出云阳免费做网站回馈大家。
Dim mysqlstr As String = "SELECT * FROM 登录表 WHERE users='" username " 'AND password='" userpassword " '"
修改为:
Dim mysqlstr As String = "SELECT * FROM 登录表 WHERE users='" username "' AND password='" userpassword "'"
If TextBox1.Text = "123" TextBox2.Text = "123" Then
改成 If TextBox1.Text = "123" and TextBox2.Text = "123" Then
Private Sub BtOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btok.Click
Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Admin.accdb;Persist Security Info=True")
Dim com As OleDbCommand = New OleDbCommand("select * from 用户名", con)
con.Open()
Dim h1 As OleDbDataReader
Dim table As New DataTable
h1 = com.ExecuteReader()
table.Load(h1)
If txtName.Text = "" Then
MsgBox("请输入用户名", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
ElseIf txtName.Text "" And txtPasswd.Text = "" Then
MsgBox("请输入密码", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
ElseIf table.Select("用户名='" txtName.Text "'").Length 0 Then
If table.Select("用户名='" txtName.Text "'")(0)("密码").ToString = txtPasswd.Text Then
MsgBox("成功登陆", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示") Then
Form1.Show()
Me.Visible = False
Exit Sub
Else
MsgBox("密码错误", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
End If
Else
MsgBox("用户名不存在", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
Exit Sub
End If
table.Clear()
h1.Close()
con.Close()
End Sub