Hi Guys!
In my VB.Net form I have NameBox and a SurnameBox and they are writing the data to the related columns in my sql server 2012 database with a Save button.
So how can I write something to the buttonclick event like:
If NameBox.Text & " " & SurnameBox.Text = Contacts_Table Name_Colum & " " & Contacts_Table Surname_Colum(for the same row) Then
Messagebox.Show("A person with the same name and surname already exist!")
End If
or
Count of Contacts_Table Name_Colum & " " & Contacts_Table Surname_Colum for the same line(row) returns 1 or more results for the string NameBox.Text & " " & SurnameBox.Text, then, show the warning.
In many places, they say it can be achieved by writing a query. How can I write this? Any example? Also I read something like VLookUp. How can I use this? Or does it have nothing to do with my question?
I am sorry for my bad English. I hope, I was able to define what I need.
Thanks a lot!