I’m working on a project where the customer would like all number-like datatypes (int, float, decimal, etc) changed to a Numeric(38,X), retaining precision and scale, where neccesary. For example(s):
Decimal(19,4) --> Numeric(38,4)
Int --> Numeric(38,0)
I’m able to grab the object:
var NumericDataType = Model.ModelDef.DataTypes.GetObjectByName(“Numeric(%p1,%p2)”);
But, I can’t figure out how to grab the precision (or add precision where necessary). I thought the following would work, but it’s proving not to:
I only included what was relevant to the discussion. I’m mostly interested to know how you can influence precision and scale in this activity. Again, my code doesn’t throw an error, but it also doesn’t provide the precision and scale.
I’ve looked at other areas of the forum (actually just a few posts ago in this category), and it looks like this is entirely possible, but for some reason, I’m NULLING out the precision/scale by doing this.
I’m up against a hard deadline today. If you can give me a little cheese to nibble on until Monday, I’d be most grateful.