We are in the third part of the Database Connectivity Tutorial in the Vb. We will continue to the previous post in this section.
As we have completed the data insertion and retrieval process in the previous tutorials.
Here, I’m not going to change any controls in the windows form. Ole Db Data Adapter("SELECT *FROM student WHERE st_id =" & int St Id, con) Dim dt As New Data Table da.
So, this is the database table which we have created in the previous tutorial.
We have inserted the records from the windows form application to the database.
We have used MS Access Database for the operations.
Add some record first", "Edit Denied", Message Box Buttons. Error) End If End Sub Private Sub btn Save_Click(sender As Object, e As Event Args) Handles btn Save.
Show("Enter the Date of Birth", "Input Error", Message Box Buttons. Show("Select the State", "Input Error", Message Box Buttons. Show("Enter the Country", "Input Error", Message Box Buttons. Show("Records updated ", "Success", Message Box Buttons. Information) End If ' refreshing data Display Data() Clear. Close() 'closing connection End If Catch ex As Exception Message Box. Message, "Exception occurred", Message Box Buttons. I hope this will help out to understand the basic operation of the database. Error) End Try End Sub Hence, we have successfully done the database operation such as Select (Retrieval), and the Update in this Data Grid View update database post.