Hello Im working on simple project to figure out how does databases work. I want to start by simple adding a new record in database using my form. + Create database "users.accdb." + Create Form in vB + Connect database to form. Screenshot Now i want when i fill the fields Name,Username,Password,Age and click on Register i want to add all those records to my database, so the next time when i open the database i have the records saved. Im kinda bad with English so if you don't understand me ask me ... Have a nice day After few hours searching i found solution :
Edit: How can i check if some record exist in database ? .. Im making a simple Login Form connected to database, So i have database users and now i want to compare if username.text and password.text exist in my database ? . I know basics about sql queries (Select * From ....Where ...) if that can help me .. I need your help or tutorial how to do this only. NOT tutorial about milion other things which i don't need to learn now . Code Form2 Public Class Form2 Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load TableUsersBindingSource.AddNew() End Sub Private Sub bDona_Click(sender As Object, e As EventArgs) Handles bDona.Click If (rName.Text = "" Or rUsername.Text = "" Or rpw.Text = "" Or rpw2.Text = "" Or rAge.Text = "") Then MsgBox("Molimo popunite sva polja", MsgBoxStyle.Critical) Else TableUsersBindingSource.EndEdit() TableUsersTableAdapter.Update(UserssDataSet.tableUsers) MsgBox("Registracija uspjesna", MsgBoxStyle.Information) Me.Hide() End If End Sub Private Sub rAge_Validating(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles rAge.Validating If Not IsNumeric(rAge.Text) Then MsgBox(" Unesite brojacanu vrijednost za godine !", MsgBoxStyle.Critical) End If End Sub End Class Code (markup):