DataType Attribute
Blackbaud Infinity uses DataType to select the data entry control to use (text fields use text boxes; Boolean fields use checkboxes, etc.) If the value is set to AutoOrString then the type will be inferred when the spec is loaded, and if it cannot be inferred the type will be inferred as String.
This is the data type returned to the parameters for the form implementations. Those parameters do not necessarily require the corresponding data type and the eventual columns for the tables to which the implementations save and load do not necessarily map to the same data type. However a correspondence between data types on the form field, data types on Table Specs, and Transact-SQL data types is suggested as follows:
-
String
May correspond to Table Spec TextField or MemoField
May map to nvarchar(n) where n=1 to 4000 (TextField) or nvarchar(max) (MemoField): nchar and nvarchar (Transact-SQL)
-
Integer: -231 - 231-1
May correspond to Table Spec NumberField Type="int"
May map to int: int, bigint, smallint, and tinyint (Transact-SQL)
-
Long: -263 - 263-1
May correspond to Table Spec NumberField Type="bigint"
-
TinyInt: 0-255
May correspond to Table Spec NumberField Type="tinyint"
May map to tinyint: int, bigint, smallint, and tinyint (Transact-SQL)
-
Date
May correspond to Table Spec DateField IncludeTime="false"
May map to date: date (Transact-SQL)
-
Money
May correspond to Table Spec MoneyField
May map to money: money and smallmoney (Transact-SQL)
-
Decimal
May correspond to Table Spec DecimalField
May map to decimal: decimal and numeric (Transact-SQL)
-
Boolean
May correspond to Table Spec BooleanField
May map to bit: bit (Transact-SQL)
-
Guid
May correspond to Table Spec GuidField or ForeignKeyField
May map to uniqueidentifier: uniqueidentifier (Transact-SQL)
-
XML
May correspond to Table Spec XMLField
May map to xml: xml (Transact-SQL)
-
FuzzyDate
May correspond to Table Spec FuzzyDateField
May map to char(8): char and varchar (Transact-SQL)
-
MonthDay
May correspond to Table Spec MonthDayField
May map to char(4): char and varchar (Transact-SQL)
-
EmailAddress
May correspond to Table Spec EmailAddressField
May map to nvarchar(100): nchar and nvarchar (Transact-SQL)
-
WebAddress
May correspond to Table Spec WebAddressField
May map to nvarchar(2047): nchar and nvarchar (Transact-SQL)
-
Binary
May correspond to Table Spec BinaryField
May map to varbinary: binary and varbinary (Transact-SQL)
-
SmallInt
May correspond to Table Spec NumberField Type="smallint"
May map to smallint: int, bigint, smallint, and tinyint (Transact-SQL)
-
HourMinute
May correspond to TableSpec HourMinutField
May map to char(5): char and varchar (Transact-SQL)
-
Year
May correspond to Table Spec YearField
May map to smallint derivative UDT_YEAR
-
DateWithTimeOffset
May map to datetimeoffset: datetimeoffset (Transact-SQL)
-
Time
May correspond to TableSpec TimeField
May map to time: time (Transact-SQL)