From: Ben on 1 Jul 2010 10:19 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 1 Jul 2010 10:35 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 2 Jul 2010 07:13 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 3 Jul 2010 09:23 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 > > . > >
|
Pages: 1 Prev: TRANSACTION PROBLEM, Pls Help me! Next: Alternative to dynamic SQL in Table Valued Function? |