corrected usage of DataType.Scale when generating SQL as it is optional now