开发者

Data type to store file

Tell me the datatype in MS SQL server to store an开发者_运维技巧y word/pdf file.


in SQL Server to store the images or any doc types.

binary [ ( n ) ]

Fixed-length binary data with a length of n bytes, where n is a value from 1 through 8,000. The storage size is n bytes.

varbinary [ ( n | max) ]

Variable-length binary data. n can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of the data entered + 2 bytes. The data that is entered can be 0 bytes in length. The ANSI SQL synonym for varbinary is binary varying.

varbinary - Newly introduced in SQL Server 2005

More info : http://www.eggheadcafe.com/community/aspnet/2/10074732/upload-a-word-or-pdf-file.aspx

Store and Retrieve PDF file


It's been a long time since i've used SQL server. You should look for blob field type for storing large data or binary data. check out msdn.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜