Which part is not working? What error do you get?
At least using TextBox1.Text in both SET and WHERE seems a bit suspicious. If roll exists, you update roll-field with the same value it already has. If roll does not exists, then your update fails.
Also, open connection before you assign it to command:
con.Open()
umd.Connection = con
Teme64
Veteran Poster
1,031 posts since Aug 2008
Reputation Points: 218
Solved Threads: 203
is there any condition to execute the block of code ?
debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
Do you get an error message? Or does your code "work" i.e. no error message, but the database will not be updated?
Teme64
Veteran Poster
1,031 posts since Aug 2008
Reputation Points: 218
Solved Threads: 203