OpenEdge Data Management: DataServer for Microsoft SQL Server
OpenEdge Data Management: DataServer for Microsoft SQL Server
OpenEdge Data Management: DataServer for Microsoft SQL Server
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
ntext 9<br />
nvarchar(max)<br />
<strong>SQL</strong>_NLONGVARCHAR CHARACTER<br />
money <strong>SQL</strong>_DECIMAL DECIMAL<br />
(INTEGER)<br />
smallmoney <strong>SQL</strong>_DECIMAL DECIMAL<br />
(INTEGER)<br />
datetime <strong>SQL</strong>_TIMESTAMP<br />
smalldatetime <strong>SQL</strong>_TIMESTAMP<br />
<strong>Data</strong> type conversion details<br />
Table C–1: MS <strong>SQL</strong> <strong>Server</strong> data type details (2 of 2)<br />
MS <strong>SQL</strong> <strong>Server</strong> data<br />
type<br />
<strong>SQL</strong>-ODBC 1<br />
data type<br />
CHARACTER 13<br />
(DATE 14 )<br />
CHARACTER 13<br />
(DATE 14 )<br />
binary<br />
7 <strong>SQL</strong>_BINARY CHARACTER<br />
varbinary <strong>SQL</strong>_VARBINARY CHARACTER<br />
image <strong>SQL</strong>_LONGVARBINARY<br />
CHARACTER 12<br />
bit <strong>SQL</strong>_BIT LOGICAL<br />
timestamp 15 <strong>SQL</strong>_VARBINARY Unsupported<br />
identity 16 NA Not supported<br />
<strong>OpenEdge</strong>-equivalent<br />
data types<br />
1. The <strong>SQL</strong>-ODBC data types demonstrate the mapping of native MS <strong>SQL</strong> <strong>Server</strong> data types to the ODBC standard.<br />
2. Existing or new 32-bit INTEGER data types have a maximum internal field size of 64-bits. The internal field<br />
expansion supports larger values defined as INTEGER data types.<br />
3. Numeric expressions supported include DECIMAL, INTEGER, and INT64.<br />
4. The <strong>OpenEdge</strong> INT64 data type enables the MS <strong>SQL</strong> <strong>Server</strong> <strong>Data</strong><strong>Server</strong> BIGINT data type to be successfully pulled<br />
into a schema holder.<br />
5. The <strong>Data</strong><strong>Server</strong> truncates values in MS <strong>SQL</strong> <strong>Server</strong> decimal or numeric columns defined with a scale greater than<br />
10. In the case of float columns, it reliably translates up to 10 places only.<br />
6. Do not use the FLOAT or REAL data types in joins, in primary keys, or with the equality operator.<br />
7. When you define a binary or char column to allow nulls, MSS stores the data type definitions as varbinary and<br />
varchar respectively. This does not affect how the <strong>Data</strong><strong>Server</strong> maps the MSS data types to <strong>OpenEdge</strong> data types.<br />
8. When migrating an <strong>OpenEdge</strong> database to <strong>SQL</strong> <strong>Server</strong>, character fields whose <strong>for</strong>mat is less than x(8000) are defined<br />
as VARCHAR by default. Larger character fields are defined as TEXT. If there are several large text fields in one<br />
record that each individually fall under the size limits to be defined as VARCHAR, but in sum exceed the maximum<br />
record size <strong>for</strong> <strong>SQL</strong> <strong>Server</strong>, it will be necessary to define the fields as TEXT to successfully create the records.<br />
9. Text/ntext types changed to varchar(max)/nvarchar(max) in MS <strong>SQL</strong> <strong>Server</strong> 2005.<br />
10. The amount of data that can be accessed in a field defined to be TEXT by an <strong>OpenEdge</strong> application is limited by<br />
the maximum size of a record that can be passed to the client. The maximum is 32K. The per<strong>for</strong>mance option<br />
BINDING cannot be used with a TEXT data type. To work around that limitation, construct field lists to exclude the<br />
retrieval of the TEXT data. Starting in MS <strong>SQL</strong> <strong>Server</strong> 2005, non-Unicode CLOB types are mapped to varchar(max)<br />
instead of text and Unicode CLOB types are mapped to nvchar(max).<br />
11. Starting in MS <strong>SQL</strong> <strong>Server</strong> 2005, CLOB types are mapped to varchar(max) instead of text.<br />
12. Although the MS <strong>SQL</strong> <strong>Server</strong> text and image fields can hold up to 2MB, <strong>OpenEdge</strong> retrieves only up to 32,000<br />
bytes. If you are using an <strong>OpenEdge</strong> Format phrase, there might be additional limits on the size of text and image<br />
fields. See <strong>OpenEdge</strong> Development: ABL Reference. You can use the <strong>Data</strong><strong>Server</strong> (-Dsrv<br />
MAX_LENGTH) startup parameter to limit the amount of returned text data.<br />
13. By default, the initial value of a MS <strong>SQL</strong> <strong>Server</strong> datetime or smalldatetime column is the Unknown value (?). The<br />
default initial values <strong>for</strong> binary and varbinary are also the Unknown value (?). The MS <strong>SQL</strong> <strong>Server</strong> datetime and<br />
smalldatetime data types contain both date and time in<strong>for</strong>mation. The <strong>Data</strong><strong>Server</strong> maps these to the <strong>OpenEdge</strong><br />
DATE data type; however, you can change the DATE data type to CHARACTER in the schema holder. If you do this,<br />
remember to change the <strong>for</strong>mat to match the new data type. For example, if you change the data type to<br />
CHARACTER, specify a character <strong>for</strong>mat, such as x(26).<br />
C–3