13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Data</strong> types<br />

MS <strong>SQL</strong> <strong>Server</strong> data types differ from <strong>OpenEdge</strong> data types. However, each data type<br />

supported by the <strong>Data</strong><strong>Server</strong> has at least one <strong>OpenEdge</strong> equivalent.<br />

<strong>Data</strong> types<br />

The <strong>Data</strong><strong>Server</strong> translates MS <strong>SQL</strong> <strong>Server</strong> data types into <strong>OpenEdge</strong> equivalents and places the<br />

mapping into the schema holder. You can access this mapping in<strong>for</strong>mation using the <strong>Data</strong><br />

Dictionary. For example, the <strong>Data</strong> Dictionary lists the MS <strong>SQL</strong> <strong>Server</strong> datetime and<br />

smalldatetime data types as timestamp, which is the equivalent ODBC <strong>SQL</strong> data type and not<br />

the MS <strong>SQL</strong> <strong>Server</strong> timestamp data type. There can also be some restrictions in data source<br />

compatibility with <strong>OpenEdge</strong>.<br />

You can also modify these definitions using the <strong>Data</strong> Dictionary. For example, the <strong>Data</strong><strong>Server</strong><br />

maps the MS <strong>SQL</strong> <strong>Server</strong> tinyint data type to the <strong>OpenEdge</strong> equivalent, INTEGER. Suppose,<br />

however, that your application uses the tinyint field in such a way that the LOGICAL data type<br />

is a more suitable equivalent. In this case, you would change the data type from INTEGER to<br />

LOGICAL in the schema holder. If you do change a data type mapping, be sure to select a data<br />

type that accommodates the data in the column, otherwise conversion errors might occur at run<br />

time. Also, remember to specify a display <strong>for</strong>mat that is appropriate <strong>for</strong> the new data type. See<br />

the “Modifying a schema holder” section on page 7–32 <strong>for</strong> an explanation of how to use the<br />

<strong>Data</strong> Dictionary to change <strong>OpenEdge</strong> data types in the schema holder.<br />

Table 2–5 lists these data types and their default <strong>OpenEdge</strong> equivalents. The data types in<br />

parentheses are alternative data types that you can specify in the schema holder <strong>for</strong> your MS<br />

<strong>SQL</strong> <strong>Server</strong> data source. See Chapter C, “<strong>Data</strong> Type Details” <strong>for</strong> more details about each MS<br />

<strong>SQL</strong> <strong>Server</strong> data type, its ODBC <strong>SQL</strong> equivalent, and <strong>OpenEdge</strong> data type equivalent.<br />

Table 2–5: MS <strong>SQL</strong> <strong>Server</strong> data type equivalents in <strong>OpenEdge</strong> (1 of 3)<br />

integer<br />

bigint<br />

smallint<br />

tinyint<br />

MS <strong>SQL</strong> <strong>Server</strong> data type <strong>OpenEdge</strong> data type equivalent 1<br />

INTEGER<br />

(DECIMAL)<br />

(LOGICAL)<br />

(INT64)<br />

INT64<br />

(DECIMAL)<br />

(INTEGER)<br />

INTEGER<br />

(DECIMAL)<br />

(LOGICAL)<br />

(INT64)<br />

INTEGER<br />

(DECIMAL)<br />

(LOGICAL)<br />

(INT64)<br />

decimal DECIMAL<br />

(INTEGER)<br />

(INT64)<br />

numeric DECIMAL<br />

(INTEGER)<br />

(INT64)<br />

2–17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!