Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I search the database for data and return a True or false?

Data database False Return search
0
Posted

How do I search the database for data and return a True or false?

0

I am trying to add code to check if the information in the first two TextBoxes(FirstName and LastName) is already in the database(so that I can just update it) or if the TextBoxes contain new names so that it will continue to add a new DataRow…… Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click ‘Create a variable for the child’s photo’ Dim ChildPhoto As String ChildPhoto = ChildPhotoPB.ImageLocation ‘Make sure names have been entered’ If TextBox1.Text = “” Or TextBox2.Text = “” Then MessageBox.Show(“Please enter a first and last name.”) Else ‘Copy the information from the variables to the database’ Dim newChildRow As Child_Information_DatabaseDataSet.Child_InformationRow newChildRow = CCPD.Main.MainUC1.Child_Information_DatabaseDataSet.Child_Information.NewChild_InformationRow newChildRow.FirstName = TextBox1.Text : newChildRow.LastName = TextBox2.Text : newChildRow.DOB = DateTimePicker1.Text : newChildRow.FDOC = DateT

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123