Skip to content

General config/SQL mismatches for custom columns #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MV10 opened this issue Oct 7, 2018 · 1 comment · Fixed by #166
Closed

General config/SQL mismatches for custom columns #157

MV10 opened this issue Oct 7, 2018 · 1 comment · Fixed by #166
Assignees
Labels

Comments

@MV10
Copy link
Contributor

MV10 commented Oct 7, 2018

Custom column configuration in the old .NET Framework code accepts a DataLength property which is never applied to the resulting DataColumn.MaxLength property for Binary and VarBinary column data types. (It is applied properly for the various character column types such as NVarChar.)

In general, I'm overhauling how additional columns are created, so I'll end up fixing this at the same time.

@MV10 MV10 added the bug label Oct 7, 2018
@MV10 MV10 self-assigned this Oct 7, 2018
@MV10 MV10 changed the title Length ignored for binary/varbinary columns General config/SQL mismatches for custom columns Oct 8, 2018
@MV10
Copy link
Contributor Author

MV10 commented Oct 8, 2018

Some column types wind up as different types upon auto-create. ConvertSqlDataTypecs (yes the filename has a typo) converts a SQL decimal to a .NET decimal (which is correct) but then upon auto table creation SqlTableCreator converts that to a SQL real column.

There are other issues, such as accepting a SQL time column which has no corresponding match in SqlTableCreator.

The overhaul will unify things so that config exclusively uses CommonColumnOptions and only references SQL data types in config (including config-by-code) and the use of DataColumn will be a purely internal matter. An ExtendedProperties key SqlType will track the real SQL data type so that it isn't lost when it gets dumbed-down to the .NET System.Type equivalents.

As a result the older AdditionalDataColumns will be deprecated in favor of the new CommonColumnOptions-based AdditionalColumns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant