I know how to insert a new row into a table that has a binary column. But is there any way to update the binary column once that row has been added? So far an exhaustive google search has turned up nothing.
MY solution so far is this
- Get the current row that I wish to update
- delete the row that I wish to update
- Create a new row with the information from the row I wish to update plus the new binary
It just doesnt seem very elegant, and I was hoping I could do the same thing with an update statement.
Here is the updated code I am using now for reference
Dim objCommand As New SqlCommand("UPDATE " & Tablename & " SET " _
& column & " = Data WHERE " & criteria)
objCommand.Parameters.Add("@Data", SqlDbType.Image)
objCommand.Parameters("@Data").Value = BinaryData