I'm doing my work in VB express 2008. I'm trying to connect it to my access 2007 Database, so a user can log in with ther username and password, if they are using valid username/password.
I've connected my Access 2007 database using Data Source window: data->show data sources->add new data source.
Is this the correct way to connect database for my Log-In page?
I really don't know what to do from here.
Can anyone please guide me?
Here's my code so far, and I've attached my GUI, so you can easily see what I'm trying to do.
Public Class Loginform Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles newuserLinkLabel.LinkClicked Register.Show() End Sub Private Sub okButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles okButton.Click Dim userName As String = usernameTextBox.Text Dim password As String = passwordTextBox.Text If (userName.Length <> 0) Then --------------> what code do I need here to check if a user typed the correct username that matches the data in database? --------------------- Else MessageBox.Show(Me, "Please complete the information.", "Login Error") End If End Sub Private Sub ClearButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearButton.Click Me.usernameTextBox.Text = "" Me.passwordTextBox.Text = "" End Sub End Class
This post has been edited by nemse: 05 December 2008 - 02:05 PM