DataTypeManagerGetFieldType Method |
Returns form field data type from database column data type.
Some sql types map to multiple field types that differ by size, e.g. nvarchar has more field data types that differ by size.
Specify size to get more accurate result. By default max size for given sql type is used.
Namespace: CMS.DataEngineAssembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 9.0.0
Syntaxpublic static string GetFieldType(
string sqlType,
int size = -1,
bool throwException = false
)
Parameters
- sqlType
- Type: SystemString
Database column data type - size (Optional)
- Type: SystemInt32
Specify the size of sql type to get accurate result - throwException (Optional)
- Type: SystemBoolean
Indicates if exception should be thrown for unsupported SQL data type
Return Value
Type:
String
See Also