VB.net web system with a SQL Server 2005 backend. I've got a stored procedure that returns a varchar, and we're finally getting values that won't fit in a varchar(8000).
I've changed the return parameter to a varchar(max), but how do I tell the OleDbParameter.Size Property to accept any amount of text?
As a concrete example, the VB code that got the return parameter from the stored procedure used to look like:
objOutParam1 = objCommand.Parameters.Add("@RStr", OleDbType.varchar)
objOutParam1.Size = 8000
objOutParam1.Direction = ParameterDirection.Output
What can I make .Size to work with a (max)?
Update:
To answer some questions:
For all intents and purposes, this text all needs to come out as one chunk. (Changing that would take more structural work than I want to do - or am authorized for, really.)
If I don't set a size, I get an error reading "String[6]: the Size property has an invalid size of 0."