How can I insert over 8000 bytes into SQL using C#?

c#, sql-server

Solution

which version of SQL are you using? SQL 2008 supports the varchar(MAX) variable which allows a much larger amount of text.

Update: Sorry, that's Microsoft SQL 2005 and greater ... varchar(MAX) can hold 2GB of data .... you didn't specify if you're using MS-SQL so I made an assumption.

Problem

How can I insert over 8000 bytes into SQL using C#? I have a large amount of text I want to store in a varchar, 8000 bytes seems to be the limit, can I increase this? Thanks

Original source