On [DbTypes x SqlServer](https://github.com/SharpTools/sharpdata/wiki/DbTypes-x-SqlServer) is documented that the types generated for DbType.AnsiString are the following: * char(255) if precision is not specified * char(n) if precision is between 1 and 255 * text if precision is between 256 and 65535 * mediumtext if precision is between 65536 and 16777215 Based on [SQL Server Data Type Mappings](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql-server-data-type-mappings) the type used for AnsiString should be: * varchar(255) if precision is not specified (to remain compatible with previous behavior) * varchar(n) for precision between 1 and 8000 * varchar(max) for precision bigger than 8000 The mediumtext datatype does not exist on SQL Server and text datatype is [deprecated](https://docs.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql?view=sql-server-2017), but should be used if SQL Server is version 2005 or older.
Activity
beppler commentedon Aug 3, 2018
I've created a project fork at https://github.com/mpsinfo/sharpdata that contains this update.