當前位置:編程學習大全網 - 網站源碼 - VB.net +access 進行用戶登錄驗證,麻煩哪位寫給我看看。模板或者原代碼都行。

VB.net +access 進行用戶登錄驗證,麻煩哪位寫給我看看。模板或者原代碼都行。

Dim str As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\DSJTXT.mdb"

Dim conn As New OleDb.OleDbConnection(str)

conn.Open()Dim sql As String = "select * from user_tbl where u_name='" & yhm.Text.ToString.Trim & "' and u_password='" & mm.Text.Trim & "'"

Dim cmd As New OleDb.OleDbCommand(sql, conn)

Dim datareader As OleDb.OleDbDataReader = cmd.ExecuteReaderIf datareader.Read = True Then

msgbox("登錄成功!")Else msgbox("登錄失敗!")

End Ifconn.Close()

  • 上一篇:linux是用什麽語言編寫的
  • 下一篇:android怎麽用intent跳轉到文件管理器
  • copyright 2024編程學習大全網