Larry - 2006-10-19

The generator creates SQL code that will not work in SQL2005.
nvarchar(max), varchar(max), varbinary(max) data types are not handled properly in SQL2005.

A complete fix would add a selection on the main form for the user to specify the Server version.
However since we only use SQL2005 I did not make that distinction.

In the Utility.cs file the "CreateParameterString" function has the spec for the SQL types. You must fix the three items listed above.

case "nvarchar":
  if (column.Length == "-1")
     column.Length = "max";
  parameter = "@" + column.Name + " "+            column.Type + "(" + column.Length + ")";
  break;

The fix checks the column.Length and makes a substitution.