You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The auto create process will throw an error if you have a datacolumn of type string and the max length is not set. Specfically, SelfLog just shows that it blew up during table auto creation but doesn't say why. I had to run a sql trace to see what it was blowing up. I had to run a sql trace to see the actual error:
"Line 2: Length or precision specification 0 is invalid."
Once you set the MaxLength property for the DataColumn the issue no longer happens. Would be nice if MaxLength property was required when column type is of type string.
The text was updated successfully, but these errors were encountered:
Since my PR to split the project into Framework ConfigManager and Standard IConfig involves separating the DataColumn creation into a class shared between targets, I'll add exceptions for missing lengths (I assume that's what you mean by "blow up in a controlled manner").
I think true MAX can be changed by the DBA (or maybe just DBO, I've never had to do it), so in theory I don't think we could set a default with 100% safety without querying, which seems like overkill to me.
Maybe after the PR, this stops being a "bug" and becomes a "feature" request, in case exception is too severe? I haven't used auto-create (I'm a little surprised it's so popular), but I know my assumption would have been MAX on something like varchar before I thought about how to get that value.
The auto create process will throw an error if you have a datacolumn of type string and the max length is not set. Specfically, SelfLog just shows that it blew up during table auto creation but doesn't say why. I had to run a sql trace to see what it was blowing up. I had to run a sql trace to see the actual error:
"Line 2: Length or precision specification 0 is invalid."
Once you set the MaxLength property for the DataColumn the issue no longer happens. Would be nice if MaxLength property was required when column type is of type string.
The text was updated successfully, but these errors were encountered: