This is the problem:
In the latest version of TemplateLib/CommonSqlCode.cs we have:
/// <summary>
/// Determines whether base DataObjectBase is a string type, and not a blob column of text or ntext
/// </summary>
public bool CanCheckLength(SchemaExplorer.DataObjectBase column)
{
switch (column.DataType)
{
case DbType.AnsiString:
case DbType.AnsiStringFixedLength:
case DbType.String:
return (column.Size != -1);
break;
case DbType.StringFixedLength:
return
(
column.NativeType != "text" &&
column.NativeType != "ntext" &&
column.Size > 0
);
break;
default:
return false;
}
}
This used to be:
/// <summary>
/// Determines whether base DataObjectBase is a string type, and not a blob column of text or ntext
/// </summary>
public bool CanCheckLength(SchemaExplorer.DataObjectBase column)
{
switch (column.DataType)
{
case DbType.AnsiString:
case DbType.AnsiStringFixedLength:
case DbType.String:
case DbType.StringFixedLength:
return
(
column.NativeType != "text" &&
column.NativeType != "ntext" &&
column.Size > 0
);
default:
return false;
}
}
However, ntext is of type DbType.String and have a 'field lenght' of 16...