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.

Initial Programming Considerations<br />

2–6<br />

In order <strong>for</strong> <strong>Data</strong><strong>Server</strong> applications to manipulate data from a MS <strong>SQL</strong> <strong>Server</strong> data source<br />

accurately, you must specify the correct code page and collation in the schema holder. For<br />

<strong>OpenEdge</strong> applications accessing the <strong>Data</strong><strong>Server</strong>, the schema holder identifies the code page of<br />

the character data. The <strong>Data</strong><strong>Server</strong> sends the data source name <strong>for</strong> the code page to the data<br />

source to indicate the character set <strong>for</strong> the data that the data source returns.<br />

Be sure to set the code page in the schema holder to match a code page that the MS <strong>SQL</strong> <strong>Server</strong><br />

data source supports. To minimize the number of translations, specify the default code page that<br />

the data source uses. If <strong>OpenEdge</strong> does not support the code page, you can specify instead a<br />

compatible code page that is available <strong>for</strong> your data source. The directory<br />

%DLC%\prolang\convmap contains conversion tables <strong>for</strong> all of the code pages that <strong>OpenEdge</strong><br />

supports. Check to see whether any of them match your code page.<br />

The default code page setting in the schema holder is iso8859–1. You can specify a different<br />

code page <strong>for</strong> the schema holder at the following times:<br />

• When you create the <strong>Data</strong><strong>Server</strong> schema <strong>for</strong> the MS <strong>SQL</strong> <strong>Server</strong> data source.<br />

• When you load a new schema with a specified code page into an existing schema holder.<br />

In this case, the newly loaded schema’s code page overrides the schema holder’s original<br />

code page.<br />

Note: It is possible to change the code page at other times. However, because changing the<br />

code page does not affect the data already in the database, writing new data to your<br />

database using a different code page can corrupt the data in your database. You cannot<br />

use the PROUTIL utility to change the code page used by the <strong>Data</strong><strong>Server</strong>.<br />

Keep in mind that your MS <strong>SQL</strong> <strong>Server</strong> software configuration might have local requirements<br />

<strong>for</strong> defining the proper language interface between the ODBC drivers and the data source. See<br />

your <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> database documentation <strong>for</strong> details.<br />

Client code page<br />

The Internal Code Page (-cpinternal) startup parameter determines the code page that the<br />

<strong>OpenEdge</strong> client uses when it manipulates data in memory. If the <strong>OpenEdge</strong> client uses a<br />

different code page from the code page set in the schema holder, the <strong>Data</strong><strong>Server</strong> translates<br />

between the two code pages, so you must verify that the convmap.cp file contains a conversion<br />

table <strong>for</strong> the client and the code page setting in the schema holder. Suppose, <strong>for</strong> example, that<br />

you set the schema holder to code page ibm850 and the client uses code page iso8859–1. The<br />

convmap.cp file must include a table that converts from ibm850 to iso8859–1 and from<br />

iso8859–1 to ibm850. If convmap.cp does not include the appropriate table, you can define your<br />

own conversion table.<br />

<strong>OpenEdge</strong> also allows you to define your own collation tables; however, customized collation<br />

tables only take effect after data source collation when you use the <strong>Data</strong><strong>Server</strong> to access a MS<br />

<strong>SQL</strong> <strong>Server</strong> data source. The data source collation tables, not the <strong>OpenEdge</strong> collation tables,<br />

have first priority when you per<strong>for</strong>m comparisons and sorts. After per<strong>for</strong>ming comparisons and<br />

sorts, the <strong>OpenEdge</strong> client may sort out records that do not con<strong>for</strong>m to the requirements of your<br />

customized collation tables.

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

Saved successfully!

Ooh no, something went wrong!