Load Definitions for Microsoft SQL Server
The Load Definitions functionality is supported for Microsoft SQL Server databases.
Functionality
The Load Definitions utility for Microsoft SQL Server loads tables, views, columns, and indexes.
It does not load relationships and foreign keys.
Configuration
Before loading definitions from Microsoft SQL Server:
- Specify the MSS must connector in the [DRIVERS] section of the IDE assignment file.
- Specify the $MSS path in the [PATHS] section of the IDE assignment file.
For more detailed instructions, see Import Data Definitions From a DBMS .
Data Type Mapping
The Load Definitions utility maps Microsoft SQL Server data types to Uniface data types and packing codes. The following table lists these mappings.
Microsoft SQL Server Data Type |
Supported by Load Definitions |
Uniface Data Type |
Uniface Packing Code |
Remarks |
---|---|---|---|---|
bit |
Yes |
B |
B4 |
Boolean. |
char(n) |
Yes |
S |
Cn |
Fixed length data type. n is the string length. |
nchar(n) |
Yes |
S |
Wm |
Fixed length data type. n is the string length, m is the physical maxlength as reported by the Microsoft SQL Server API. |
varchar(n) or varchar(max) |
Yes |
S |
SCn, SC* |
Variable length data type. n is the string length, non-Unicode string data. |
nvarchar(n) or nvarchar(max) |
Yes |
S |
SWm, SW* |
Variable length data type. n is the string length, Unicode string data. m is the physical maxlength as reported by the Microsoft SQL Server API. |
text |
Yes |
S |
SC* |
Variable length data type, non-Unicode. |
ntext |
Yes |
S |
SW* |
Variable length data type, Unicode. |
tinyint |
Yes |
N |
I2 |
Data range in Uniface is larger; a ValRep is generated that will limit data entry (and store validation) to the DBMS range (i.e. 0-255). |
smallint | Yes | N | I2 | |
int |
Yes |
N |
I4 |
|
bigint |
Yes |
N |
I8 |
Data range in DBMS is larger; to force proper errors during the store a ValRep will limit data entry to the Uniface range (-999999999999999 to 999999999999999). |
decimal(p,s) and numeric(p,s) |
Yes |
N |
N(p+1).s, N(p+1) |
pis precision (total number of digits); for Uniface p must be 30 max, field is skipped with a warning if p is larger. sis scale (number of decimal places); for Uniface s must be smaller than p, field is skipped with a warning if they are equal. s=0 generates N(p+1), rather than N(p+1).0 A ValRep is generated to enforce the exact DBMS max/min values during data entry and store validation; the ValRep range depends on p and s. |
float(n) with n 1 to 24 |
Yes |
F |
F4 |
DBMS allows range -1e+37 to 1e+37, while Uniface allows -1e+38 to 1e+38. Uniface will read the full range, but storing the extreme values results in an ODBC error. Generated with a warning. |
float(n) with n 25 to 53 |
Yes |
F |
F8 |
DBMS allows range -1e+308 to 1e+308, while Uniface allows -1e+307 to 1e+307. Uniface will read the full range, but storing the extreme values results in an ODBC error. Generated with a warning. |
real |
F |
|
Synonymous with float(24). | |
smallmoney |
Yes |
N |
M6 |
|
money |
Yes |
N |
M4 |
DBMS allows range -922,337,203,685,477.5808 to 922,337,203,685,477.5807 Uniface allows -9,999,999,999,999.9900 to 9,999,999,999,999.9900 A ValRep restricts data entry and store validation to the Uniface range. |
time(0) |
Yes |
T |
T |
The only time format of Microsoft SQL Server that Uniface supports. |
date |
Yes |
D |
D |
|
datetime |
Yes |
E |
E |
|
datetime2 |
Yes |
E |
E7 |
|
smalldatetime |
Yes |
E |
E9 |
|
datetimeoffset, datetimeoffset(n) |
Yes |
S |
C34 |
|
image |
Yes |
I# |
SR* |
Variable length binary data. |
binary(n) |
Yes |
R |
Rn |
Fixed length binary data, n is the data length. |
varbinary(n) or varbinary(max) |
Yes |
R |
SRn, SR* |
Variable length binary data, n is the data length. |
uniqueidentifier |
Yes |
S |
C36 |
|
time, time(n) with N > 0 |
No |
|
|
Mapping not possible: field is skipped with a warning. Note: time(0) is the only supported time format |
sql_variant |
No |
|
|
Mapping not possible: field is skipped with a warning. |
hierarchyid |
No |
|
|
Mapping not possible: field is skipped with a warning. |
geometry |
No |
|
|
Mapping not possible: field is skipped with a warning. |
geography |
No |
|
|
Mapping not possible: field is skipped with a warning. |
timestamp |
No |
|
|
Mapping not possible: field is skipped with a warning. |
xml |
No |
|
|
Mapping not possible: field is skipped with a warning. |
sysname |
No |
|
|
Mapping not possible: field is skipped with a warning. |