Differences between Image datatype and ntext | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Differences between Image datatype and ntext

Hi,
Iam facing a problem with datatype. I have a table which contains a column of ntext datatype. I am storing Files using binary read and appending Chunk by Chunk. Its working fine but its getting problem for few files i.e its not able to send all bytes of file data. For this I changed the datatype from ntext to image then its working fine.
I am not able to undestand the problem. Why few files are working with Image datatype and why few are not?.
Which datatype is prefered to store in to SQLDatabase?
Please help by giving valid reasons.
Thanks in advance
Mahesh Reddy Mreddy
See if this helps:http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)

Thanks Kalis,
The URL link which you mentioned is good to know about how ntext, text and Image datatypes works. But My problem is different, I have a file which Iam able to insert into Image datatype field and notable to insert into ntext datatype field. What could be the problem? The file types are PDF files.
Thanks
Mahesh
quote:Originally posted by FrankKalis See if this helps:http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)

Mreddy
Thanks Kalis,
The URL link which you mentioned is good to know about how ntext, text and Image datatypes works. But My problem is different, I have a file which Iam able to insert into Image datatype field and notable to insert into ntext datatype field. What could be the problem? The file types are PDF files.
Thanks
Mahesh
Mreddy
Is it compulsory to store document in database?
Why not store the PDF on a file server and store link in databsae. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
quote:Originally posted by mreddy Thanks Kalis,
The URL link which you mentioned is good to know about how ntext, text and Image datatypes works. But My problem is different, I have a file which Iam able to insert into Image datatype field and notable to insert into ntext datatype field. What could be the problem? The file types are PDF files.
Thanks
Mahesh
Mreddy
The image data typy is for binary data of any kind, while the next and ntext data types are for textual data of any kind. So, if you intend to store the whole file go with image, if you somehow extract the text off the pdf before use text or ntext. —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)

Thanks Kalis Mreddy
]]>