i have a big problem with my system, can anyone help me plz
there`s some kind of error, there are 2 text box on my interface, 1 for entering an account number and one for entering password, there is a login button also.
here is the code when clicking on the button but it does not work!!! plz
Expand|Select|Wrap|Line Numbers
- helpPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim connection As New OleDb.OleDbConnection
- Dim command As New OleDbCommand
- Dim DataReader1 As OleDbDataReader
- Dim selectall As String
- Dim Account_No As String = txtAccount.Text
- Dim Password As String = txtPassword.Text
- connection = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Datasource=db1.mdb")
- selectall = "select * FROM Security WHERE A/c_number= " & Account_No & " and Password = " & Password & ""
- command = New OleDbCommand(selectall, connection)
- connection.Open()
- DataReader1 = command.ExecuteReader()
- If DataReader1.HasRows Then
- MessageBox.Show("ok")
- Else
- MessageBox.Show("incorrect Account_No or password")
- End If
- End Sub
- End Class