By the way, Our product communicate with SQL Server using TDS protocol, we do not really care about how long varchar(max) and nvarchar(max) columns can hold.
Really ?
Keep all those buffers with infinite length in memory your product is going very well.
* Noel