Database types

Starcounter supports most of the .NET CLR primitive types.

List of supported .NET CLR types

DateTime

Starcounter saves and returns all DateTime values in UTC.

Starcounter does not yet support the DateTimeOffset data type.

Decimal

The Decimal values are stored as a 64-bit integer and has a precision of six decimals and a range between -4398046511103.999999 and 4398046511104.999999. Trying to store a Decimal value with higher precision or outside of the specified range will result in the following exception: ScErrCLRDecToX6DecRangeError (SCERR4246). In those cases, Double can be used if the data loss is acceptable.

String

The string data type can store data up to 1 MiB of encoded text. Thus, all strings with a length of less than 270600 will fit into the string data type. Strings with more than 270600 characters might fit depending on string content.

Starcounter does not yet support non-nullable strings.

Binary

The Binary data type is a Starcounter-defined datatype used to store binary data in the database. The maximum size of a binary field is 1 MiB.

Starcounter only supports nullable binary properties.

Last updated