Best way to store image, voice, text file?

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
0
Utf
7/1/2010 2:19:54 PM
sqlserver.programming 1873 articles. 0 followers. Follow

3 Replies
816 Views

Similar Articles

[PageSpeed] 58

On Thu, 1 Jul 2010 07:19:54 -0700, Ben <Ben@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
0
Iain
7/1/2010 2:35:51 PM
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@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
> .
> 
0
Utf
7/2/2010 11:13:19 AM
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@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
> > .
> > 
0
Utf
7/3/2010 1:23:33 PM
Reply:

Similar Artilces:

#Delete Mark in Bound Memo filed
I have form that has bound memo field, sometime, no sure how it happen, the memo filed is filled with #Delete. My application is a stand alone program. Kindly advise what can cause this and how to avoid it from happening. -- TS Lim When was the last time you performed a compact and repair? Is you db split? Does each user have their own copy of the front-end? Please checkout http://www.granite.ab.ca/access/corruptmdbs.htm http://www.granite.ab.ca/access/corruption/symptoms.htm http://office.microsoft.com/en-ca/access/HA011865661033.aspx - No very helpful but directly from MS ...

CSV File Problem
Can any one explain why the following problem occurs please? A colleague has a small list of data which is a csv file exported from SQL. Column One is a serial number from 1 to 29. Column 2 is a number of transactions which have occurred.(it should look like example A below in Excel) 1 475 1,475 2 1732 21,732 3 1670 31,670 4 2176 42,176 5 608 5,608 6 1579 61,579 7 43101 743,101 8 54512 854,512 9 51258 951,258 10 61050 1,061,050 A B If I double click on the csv file, it opens in Excel but c...

where's image toolbar?
I have Outlook 2003 SP2, is there a way to view an "image toolbar" to compress an image that is pasted inline into an email? A remote employee apparently has it show up automatically when pasting an image, but I can't find it. Aaron wrote: > I have Outlook 2003 SP2, is there a way to view an "image toolbar" to > compress an image that is pasted inline into an email? > > A remote employee apparently has it show up automatically when pasting > an image, but I can't find it. Hazarding a guess, I'm going to guess that either a) You haven't c...

CFile (delete file)
How can I delete all files that end with ".temp" in some folder? CFile::Remove remove unlink -- cheers, Alok Gupta Blogs: http://wdevs.com/thatsalok "Petar Popara" <my.fake@mail.net> wrote in message news:Op6#URKfFHA.2644@TK2MSFTNGP09.phx.gbl... > > How can I delete all files that end with ".temp" in some folder? > > SHFileOperation() will and it supports wildcards! DeleteFile() will operate on one file at a time. "Petar Popara" <my.fake@mail.net> wrote in message news:Op6%23URKfFHA.2644@TK2MSFTNGP09.phx.gbl... > >...

Opening an *.MSG file with it's respective attachment.
Hello, The file *.MSG is a message file. This can be viewed by any editor, like Notepad. However, when there's an attachment to it, we see garbage. Is there a way to open the attachments present inside the *.MSG files ? Thank you Yes, by opening it with Outlook. -- Roady [MVP] www.sparnaaij.net Microsoft Office and Microsoft Office related News Also Outlook FAQ, How To's, Downloads and more... Tips of the month: -Create your own fully customized Toolbar -Creating a Classic View in Outlook 2003 Subscribe to the newsletter to receive news and tips & tricks in your mailbox!...

Can't open 2005 data file after reinstalling Money 2005
I am experiencing a recurring problem. I have had to reinstall Windows XP and MS Money 2005. I am now unable to open my previously converted 2005 file or restore any backup version. I consistently get the following error message: "Money cannot locate filename or cannot open it, possibly because it is a read-only file, you do not have permission to change it, or your disk drive is write- protected. If you have chosen the correct file and it cannot be accessed, you will need to click OK and then Restore your most recent backup file." Any help or thoughts would be greatly ap...

import a 123 file
My excel version cannot open a Lotus 123 file. Is there an import feature to move the data from Lotus 123 to Excel? Thanks No, you need to convert the file either from Lotus 123 or get commercial converter -- Regards, Peo Sjoblom "Frank" <Frank@discussions.microsoft.com> wrote in message news:59B55F98-4C79-4917-928B-F1B309660730@microsoft.com... > My excel version cannot open a Lotus 123 file. Is there an import feature > to > move the data from Lotus 123 to Excel? > Thanks > > ...

Where is the cache files folder located for windows media player?
Does windows media player have a cache files folder? Where is the cache files folder located for windows media player? Or how do I find the cache files folder for windows media player? Thank You for your Help. Bob Background info: I have a desktop AMD 4400+ 64X2 4GB memory 320GB HD(way bigger than I need) Acer computer (AM3100-U3201A) I purchased new February 2008 running 32-bit MS Vista Home Premium SP2 box. I use MS auto updates. I think it has onboard shared memory for video and sound. My ISP is Comcast 12mbps with Motorola SURFboard SB5101 Cable Modem direct to...

Can't insert Char(1) into SQL Server from Stored Procedure
Hello I am trying to insert a char(1) field into a table from an ASP.Net/C# application. At first I was inserting rows into the table but none of the columns that I was inserting the rows into were char(1) columns, they were mostly int and varchar columns. Then I found out that there was one column in the list that was not supposed to be an int column but instead it was supposed to be one of the char(1) columns into the table. So I replaced the int column in the list with the char(1) column and since the value of the char(1) column resulted from a CheckBox ('Y...

Joining text with a formula in cell #4
just to complete the thread... I found the answer. You have to change the format of the cell to custom 0.00"*" this is the only way it will show only 2 decimal places Thanks for the hel -- Mustard Hea ----------------------------------------------------------------------- Mustard Head's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1630 View this thread: http://www.excelforum.com/showthread.php?threadid=27700 ...

Public Folder link to Excel File
Hi - I have a user that claims that he had a shortcut to a spreadsheet "in his public folders" at his old job. Obviously, he's an end user that may or may not know what he's talking about.... I'm trying to figure out the best way to accomodate him. He basically wants an Excel file stored on a shared folder to be available to all user as either a shortcut, or a link in the public folders (can't post to a folder as he will be updating the sheet regularly). When a user clicks on the shortcut/link, it would just launch Excel and display the file. Anybody have any ideas...

Opening pub files created with older Publisher versions #2
I have just upgraded to Publisher 2003 from 2000 and am having trouble with pub files sent to me for our chuch newsletter which is using Publisher 97 The text is not wrapping around graphics boxes. Can I fix this? I really don't want to go back to Pub 200 Thank Richard this is caused by Publisher 97 not been printer independent. Even if you went back to Publisher 2000, unless you have the identical font versions and printer driver you would have issues with formatting. It sounds like the person sending you the file has a garbage HP inkjet printer. Get them to install the HP5P laser p...

Renaming Partial File Names
Is it possible to rename part of a file name? (almost like a find and replace) My database pulls in the excel file names from a directory, with it's subfolders and contents as well. Every file begins with "Kay Form". Kay no longer works in our department, and I'd like to run a loop that replaces "Kay Form" with "Featured Track". I don't know how to do a partial replace though. Thank you in advance! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access/201001/1 Checkout the Replace function. I...

Non-VBA way of making custom menus.
Sorry for the new thread but even on Google, the thread isn't showing up. Well, it was SOOO easy, as I knew it would be. The webpage I quoted in my message this morning didn't mention the "New Menu" at all! So, here is the non-VBA way to create a custom menu: - TOOLS > CUSTOMIZE - under the categories available choose NEW MENU and then drag the NEW MENU option under the Commands window up to the menu bar (like D'UH!! <lol> Wish all those hours spent searching yielded webpages that gave this! <g>) - THEN one can go back to the MACROS category a few line...

printing imported gif files in Excel
When printing gif file with transparent background on the grey(25%) background of Excel non-transparent part of the picture has white border around it. Is there any way to prevent it? Thank you in advance... Tim ...

unknown .edb file
I have error messages in the log files that references a corrupt database named C:\Program Files\exchsrvr\Exchangeserver_Outlook.edb. "Outlook" is the name of the server. The problem is that this database is not listed in any of the Mail Stores or Public stores. I want to run the repair utilities on it, but since I'm not sure what it is used for, I don't know how I can restore it if the repair goes bad. Does anyone know what this is used for or how I can determine that myself? BTW, the database always has a current time stamp, so I assume that it is used by something....

Copying dbx files from a CDR back into Outlook
My computer was recently hijakced and I had to reinstall everything. I did however save all of my folders in Outlook onto a CD Rom and I do not know how to transfer them back so I can use them. Also I had an animated version of outlook where you could choose loads of diffent stationery and I cannot seem to find that upgrade anaywhere. Can you help me? Tee <tsahai33@hotmail.com> wrote: > My computer was recently hijakced and I had to reinstall > everything. I did however save all of my folders in > Outlook onto a CD Rom and I do not know how to transfer > them back so...

parameter for text
In Access 2003. In a form I have a parameter to search for a word at a a time Like [Froms].[Form].txtWords]&"*" which works well. .. In order to enter more than two oarameter separated by commas in txtwords I have been tryin the Str function like this "Instr([txtWords])" "Instr[txtWords]" The query displays no records at all. Could you suggest me how to do it Many thanks I would suggest separating by space and using this -- Like "*" & [Froms].[Form].txtWords] &"*" Remember that when you type in 'bell...

How do I bind a XAML text box control to a dataset?
Hello; I am new to using WinFx and I am having trouble figuring out how to bind a text box to a field in a dataset. I found an MSDN article: http://msdn2.microsoft.com/en-us/library/ms752057.aspx My question deals with the text box code: <TextBlock Text="{Binding Path=ISBN}" Grid.Column="1" /> How does this text box know to bind to the field "ISBN" in "myDataSet"? How does the control implement the dataset? Thank you Monty ...

Creating Text Box in Publisher 2007 Crashes the Application
Hello, we have a clean install of Publisher 2007 under Windows XP SP2, and when we try to create a text box in a document, (both an existing document and a blank document), publisher crashes. Office is fully patched. I ran Office Diagnostics from the help menu and no problems were found and the issue persists. Any thoughts on how to resolve the issue? Thanks, Syd See if selecting a different printer as default helps. How to view error signatures if an Office program experiences a serious error and quits http://support.microsoft.com/kb/289508/en-us -- Mary Sauer MSFT MVP http://of...

DB_Backup.MDB file has appeared beside DB.MDB.
I have a local DB.MDB which accesses a DATA.MDB on a network drive. I use a user-level security file. It has been working AOK for a year or so. Yesterday one of the users reported an error dialog when attempting to open the DB.MDB (unfortunately the wording of the dialog was not captured!) After this 'event', the database started working correctly once again. The result was a DB_Backup.MDB file appeared beside the DB.MDB. Any ideas? That backup file is created when ACCESS "crashes" during use..... -- Ken Snell <MS ACCESS MVP> "Andrew (UGL)&quo...

Selecting the Right Text Alignment for a edit box doesn't work
When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong Thanks Dan Dan, "Dan" <anonymous@discussions.microsoft.com> a �crit dans le message de news:DECFE605-A130-416B-9924-60BA0C79D684@microsoft.com... > When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong? > I've no idea :-))) You can open your RC-file as text, and make sure it has the ES_RIGHT style set, thus: EDITTEXT IDC...

Archiving Outlook.pst files to Novell Netware file server
Hi all We are trying to perform a manual Outlook inbox archive which we are tryingto save to a Novell file server - but it dowsn't work. Any ideas why? (works fine on the MS2000 server but we don't have the space for everyone) We are currently running Outlook 2003 and the Novell file server is 4.8.3 Any help would be appreciated Thanks!! kwan <kevin.kelly@levittbernstein.co.uk> wrote: > We are trying to perform a manual Outlook inbox archive which we are > tryingto save to a Novell file server - but it dowsn't work. Any ideas > why? (works fine on the MS2000 s...

Sorting by file extension in a worksheet
Hello, I have an excel worksheet which has a list of file names from a directory and various stats about each file. I need to be able to sort them by the file extension. Eg. c:\documents\folderA\picture1.eps c:\documents\folderB\document.doc I would like to sort them by the ".eps" extension. I have tried using the Data,Sort menu and something like *?*.eps as the criteria. But am obvisouly missing something. Any help would be most appreciated. Thanks Karl You could use a helper column to extract just the extension then include this in your sort range and sort on the helper col...

convert to stored proc
Hello. I have been given a conversion assignment to convert Access db (frontend) with sql server 2005 backend to be included in a new webapp that is being constructed. Unfortunately, my stored proc creating is a bit weak and I'm not afraid to admit it. With that said, I came across an Access query that is puzzling me. Here it is; SELECT Purchase Orders *, POSO Relationships.SONumber AS RelatedSONumber, IIf([POSOType], [POSOType], 'Standard') AS POSOTypeFull, POSORelationships.MTXRMA, POSORelationships.SupplierRMA, POSORelationships.POSOType FROM PurchaseOrders ...