Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Best way to store image, voice, text file?

3 views
Skip to first unread message

Ben

unread,
Jul 1, 2010, 10:19:54 AM7/1/10
to
Hello there,

Is it possible to define a sql server field to store image, or voice, or
text file?

If the size of the file is very big, thus exceeding the max row size 8064
bytes limit, is it better to store it in a directory, and just save the
location of the file in the field?

Thanks,
Ben

Iain Sharp

unread,
Jul 1, 2010, 10:35:51 AM7/1/10
to
On Thu, 1 Jul 2010 07:19:54 -0700, Ben <B...@discussions.microsoft.com>
wrote:

Depending on the version of sql server, check out the following data
types :-
image, text (2000)
varchar(max), nvarchar(max), varbinary(max) (2005)
and filestream (2008)

Storing it on the hard drive and having a pointer to the location is
only any good if you back up the binary files alongside the database.

Iain

Ben

unread,
Jul 2, 2010, 7:13:19 AM7/2/10
to
If I define a table with 2 fields in 2005 version, say

Table1:
1) field1 char(8)
2) feild2 varbinary(max)

, and the voice/image file stored in field2 is 4mb, the record will be
created, not constraint by the max row size of 8064 bytes?

Thanks,
Ben

"Iain Sharp" wrote:

> .
>

Ben

unread,
Jul 3, 2010, 9:23:33 AM7/3/10
to
varchar(max), nvarchar(max), varbinary(max) can store up to 2GB - 1 bytes of
data.
0 new messages