SHARE
TWEET

Untitled

Ortund Feb 27th, 2014 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim conn As New SqlConnection(connectionString)
  2.  
  3. Dim sql As String = "update table1 set value1 = @value where pkvalue = @pk"
  4. Dim cmd As New SqlCommand(sql, conn)
  5.  
  6. cmd.Parameters.AddWithValue("@value", TextBox1.Text)
  7. cmd.Parameters.AddWithValue("@pk", primaryKeyValue)
  8.  
  9. conn.Open()
  10. cmd.ExecuteNonQuery()
  11. conn.Close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top