VB+ACCESS人事管理系统原代码 你可以搜索一下大学生计算机论坛cccbbs的毕业设计范例,有这个设计 成品
我这里有一份,有的联系我,百度天天在线!
我用vb2005编写
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myconnection As New OleDbConnection _
("provider=microsoft.jet.oledb.4.0;data source=db1.mdb")
Dim mycommand As OleDbCommand
Dim mydatareader As OleDbDataReader
myconnection.Open()
Dim s As String = "select * from users where 用户名='" & Trim(TextBox1.Text).Replace("'", "''") & "' and 密码='" & Trim(TextBox2.Text).Replace("'", "''") & "'"
mycommand = New OleDbCommand(s, myconnection)
mydatareader = mycommand.ExecuteReader()
If mydatareader.Read = False Then
MsgBox("用户名不存在或者密码错误", 0 + 48, "提示")
End If
mydatareader.Close()
myconnection.Close()
End Sub
End Class