Image Default value to varbinary(max)

Hello, i want to have an image as default value in my varbinary(max) column.

But the data in a varbinary(max) is encrypted <binary data> :S
bskyumAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I would, for that, create a row that holds the default value, and "on insert" trigger, update the current row with the value of that default "image".
<binary data> is btw not encrypted, but the interface does not display "binary data", as it cannot know that the data is actually an image.
0
 
robastaConnect With a Mentor Commented:
That would be duplicating the default image. I would suggest that you do a check when you get the image, if the Image (varbinary field) is empty, get the default image from somewhere else (file system or a particular row in db).

The other advantage is that you can cache the 'default' image and avoid getting the same data from the database.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
good food for thought, robasta.
0
All Courses

From novice to tech pro — start learning today.