Breaking News

Update data to SQL Server from textboxes in VB.NET

Update data to SQL Server from textboxes in VB.NET 

I have a VB.Net form which allows the user to update the customer details such as name, food_type:, etc. So when the customer enters the new name for the customer name etc. the application should update the corresponding field in the existing entry that relates to the customer ID.

Create the button to take the value from the textboxes and update the SQL tables respectively.

Code for update button
Dim update As String = "UPDATE ngowi2 SET customer_id ='" & TextBox1.Text & "',customer_name='" & TextBox2.Text & "',food_type='" & TextBox3.Text & "' WHERE customer_id='" & TextBox1.Text & "'"

        ExecuteQuery(update)

        MessageBox.Show("Successsful updated")
The codes above should be written in the UPDATE button.
You can change the customer_id, customer_name and food_type by searching the customer through his id and when you click the button update changes will be saved in the database table.

Note that the you can not undo the information that you have changed, the information will be saved permanent in the database table once you click the button update.

          ******************************************
Does this help you to solve your problem of updating your information?


++++++++++++++++++++++++++++++++
 Thanks To Mr:- Marcosoft 
For anything ask,just whatsapp contact me via my email 
marcosoft41@gmail.com
+255764292989
++++++++++++++++++++++++++++++++++++++++

No comments