I am creating a project in winforms in vb.net. My requirement is to update and delete records in SQL database with a button click event. My update coding updates the whole table instead of a particular database row.I have four columns in my table. Is there any coding way where I can randomly update any two cell of a row with a where clause or condition?
Jump to Post
Quite a simple solution to your problem would be to write a query that does so!
Private Sub Button1_Click(ByVal sender as Object, ByVal e As EventArgs) Handles Button1.Click Dim con As New OleDBConnection("YourConnectionStringHere") Dim cmd As New OleDBCommand("UPDATE table1 SET col2=? WHERE col1=?",con) Try 'When using OleDB …
All 4 Replies
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.