From: Ben on
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
From: Iain Sharp on
On Thu, 1 Jul 2010 07:19:54 -0700, Ben <Ben(a)discussions.microsoft.com>
wrote:

>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

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
From: Ben on
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:

> On Thu, 1 Jul 2010 07:19:54 -0700, Ben <Ben(a)discussions.microsoft.com>
> wrote:
>
> >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
>
> 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
> .
>
From: Ben on
varchar(max), nvarchar(max), varbinary(max) can store up to 2GB - 1 bytes of
data.

"Ben" wrote:

> 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:
>
> > On Thu, 1 Jul 2010 07:19:54 -0700, Ben <Ben(a)discussions.microsoft.com>
> > wrote:
> >
> > >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
> >
> > 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
> > .
> >