Click here to Skip to main content
15,942,093 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can we store text and image both in one field to sqlserver2005 using vb.net2008... ? Plz help me out .... :(
CHill60 30-May-14 3:46am    
Think about it ... you want to put 2 things into 1 container and that container has to be 2 things at once...can't be done. If you can find some way of combining the text and the image into a single item you could store them as a blob
Member 10853731 30-May-14 3:57am    
so what is the use of Blob ? and how may i use it?
CHill60 30-May-14 4:13am    
See the solutions posted. There is no point in me explaining what a Blob could be used for as you won't find a satisfactory way of combining the image and the text. See the solutions 1 and 2 for the correct approach.

Do not do it.
Refer: how-to-store-text-and-image-in-the-same-column[^]
In relational database, every field is of one fixed data type and should only stores one single piece of data. Read more: Fundamentals of Relational Database Design[^]
Share this answer
To add to what Peter Leow has said: just because you can do something, does not mean you should do something.

I can drink a bottle of whiskey and try to drive my car home. But I'd be an idiot if I tried, and I'd deserve the punishment which would be heaped upon me when I crashed ort was caught.

Don't: If nothing else, it makes you have to retrieve a large field at all times, even if you only want the text portion.
Share this answer
Jörgen Andersson 30-May-14 5:36am    
You should also mention that there is a special punishment for those that break the first normal form.
It is possible to store text in some of the exif tags of a jpg file (see but you won't be able to query on it and it isn't a simple task to add/retrieve that text
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900