Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi! All,
I'm stuck at a situation where I have used Ajax HTMLEditorExtender to insert images and text as well, now I'm trying to save this data into my SQL Server where Column datatype is nvarchar(MAX), is there any other datatype where I can store both Text and Image and retrieve them as well.

Updated 3-Jul-14 18:59pm

Stop! Never put multiple values in a single column in a row. It can but should not be done. It is against 1NF principle. In relational database design, every row must not have a column that takes more than one value, not to mention values of different data types, which is your case of mixing text and image, They should be stored into different columns of appropriate data types.
Read more: ten-common-database-design-mistakes/[^]
Share this answer

Yes there are some other datatypes which may help you

text,ntext and image but you should avoid those data types because they are going to deprecated very soon.

so what would be the data type.

you ca use : xml[^]

but it will increase your DB size rapidly
Share this answer
you can use datatype image to store image in sql server 2008 , please refer this link[^]
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