I'm writing stored procedures in C# at the moment and I've run into a problem with the size of a parameter.
So I've created a project in VS 2008 and created several stored procedures which all look a bit like this:
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void SaveProgress(... SqlString logpart, ...)
{
...stuff...
}
}
Now because I've not specified anything else, when I deploy this to a database, the CREATE DATABASE
statement (apparently) gets created with a nvarchar(4000)
as the definition for the input parameter.
However, I regularly have to flush log parts larger than 4000 chars, so I'd like that to be nvarchar(MAX)
.
Now I think I can do some jiggery-pokery and use Management Studio to re-define the CREATE DATABASE
statment, but I'd actually like to define the fact that I want it to be MAX
in the project/solution, so the deployment gets done correctly and I don't have to start adding large wads of comments and/or documentation for anyone who needs to maintain this code after me.
Is there any way to specify this in the code or maybe in the AssemblyInfo or something like that?