Hi Guys ,
i have files which are of different sizes.How can i insert a text file which has more than 4000 characters in database .My table field is of type nvarchar so i cannot have more than 4000 characters ,is there a way around?

7 Years
Discussion Span
Last Post by sadhawan

Change your field type to ntext or nvarchar(MAX), depending on which database you are using. If you regularly go over the 8KB limit, an alternative strategy is a good idea because the overflow paging of exceeding the limit with ntext or nvarchar(MAX) can have significant overhead.

Edward wrote a repository library using WCF that works with tickets and the file system on a repository server. It works very well when the tickets are stored in a database rather than actual data because the repository server can be queried with the ticket to return a memory stream. The repository was written because Ed was working on an image processing system where the stored data was often quite a bit larger than 8K, but it is general enough that the library has seen a lot of use in Ed's projects. ;)

Unfortunately, the code is not open for posting an example, but hopefully it gives you an idea for alternative storage strategies.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.