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?
kinjal.jain.7393
0
Newbie Poster
Recommended Answers
Jump to PostQuite a simple solution to your problem would be to write a query that does so!
For example:
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 …
All 4 Replies
Begginnerdev
256
Junior Poster
Santanu.Das
125
Santanu Das
Piolo_1
0
Newbie Poster
Piolo_1
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.