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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

<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 />

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

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

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

datetime and smalldatetime data types as timestamp, which is the equivalent<br />

ODBC <strong>SQL</strong> data type and not the MS <strong>SQL</strong> <strong>Server</strong> timestamp data type. There can<br />

also be some restrictions in data source compatibility with <strong>OpenEdge</strong>.<br />

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

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

INTEGER. Suppose, however, that your application uses the tinyint field in such a way<br />

that the LOGICAL data type is a more suitable equivalent. In this case, you would<br />

change the data type from INTEGER to LOGICAL in the schema holder. If you do change<br />

a data type mapping, be sure to select a data type that accommodates the data in the<br />

column, otherwise conversion errors might occur at run time. Also, remember to specify<br />

a display <strong>for</strong>mat that is appropriate <strong>for</strong> the new data type. See the “Modifying a schema<br />

holder” section on page 308 <strong>for</strong> an explanation of how to use the <strong>Data</strong> Dictionary to<br />

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

Table 9 lists these data types and their default <strong>OpenEdge</strong> equivalents. The data types<br />

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

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

about each MS <strong>SQL</strong> <strong>Server</strong> data type, its ODBC <strong>SQL</strong> equivalent, and <strong>OpenEdge</strong> data<br />

type equivalent.<br />

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

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

integer INTEGER<br />

(DECIMAL)<br />

(LOGICAL)<br />

(INT64)<br />

bigint INT64<br />

(DECIMAL)<br />

(INTEGER)<br />

smallint INTEGER<br />

(DECIMAL)<br />

(LOGICAL)<br />

(INT64)<br />

tinyint INTEGER<br />

(DECIMAL)<br />

(LOGICAL)<br />

(INT64)<br />

decimal DECIMAL<br />

(INTEGER)<br />

(INT64)<br />

numeric DECIMAL<br />

(INTEGER)<br />

(INT64)<br />

<strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> 71

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

Saved successfully!

Ooh no, something went wrong!