?
Solved

Image Default value to varbinary(max)

Posted on 2011-02-22
3
Medium Priority
?
960 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:bskyum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 34958702
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
 
LVL 14

Assisted Solution

by:robasta
robasta earned 1000 total points
ID: 34958709
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
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34958742
good food for thought, robasta.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question