Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 23rd, 2006, 12:46 AM
Registered User
Join Date: Jun 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to store word doc in sql server using asp.net

    I’ve to store the contents in word/text documents along with the format in SQL Server table field. The document may be upto 3MB. But, the length of varbinary and varchar fields in SQL Server can be of 8000 at the max.
Any suggestions….Please welcome.

Old November 25th, 2006, 01:56 PM
Authorized User
Join Date: Sep 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts

Hi , U can use text or ntext datatype.It doesnt have max limit

Old November 28th, 2006, 09:38 AM
Authorized User
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post


text and ntext types do not store unlimited data. text can go roughly up to 2GB and ntext upto 1GB.

As SriRamaKrishna pointed out, text and ntext both data types would fill the purpose. However, logically they are used to store textual data of huge size. When storing such things as Word documents or images (read binary data), it's best to use the image data type. image can store binary data of roughly up to 2GB.

For binary data of small size, using binary or varbinary (both roughly up to 8KB) is much more efficient.



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Open A Word Doc... using ASP .net nikks9 ASP.NET 1.0 and 1.1 Professional 8 March 31st, 2015 03:45 AM
Is there a way 2 store data in a Word Doc? BrianWren VB Databases Basics 0 April 14th, 2008 06:07 PM
displaying a word doc using asp Adam H-W Classic ASP Databases 0 December 10th, 2005 09:15 AM
Creating word doc in ASP.NET ghari ASP.NET 1.0 and 1.1 Basics 1 December 10th, 2005 04:01 AM
store html code in a sql database through ASP.NET jmjyiannis VB.NET 2002/2003 Basics 0 July 9th, 2004 01:36 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.