OpenEdge Data Management: DataServer for Microsoft SQL Server
OpenEdge Data Management: DataServer for Microsoft SQL Server
OpenEdge Data Management: DataServer for Microsoft SQL Server
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–58<br />
The size of r-code grows significantly when you compile procedures against a MS <strong>SQL</strong> <strong>Server</strong><br />
data source as compared to compiling against an <strong>OpenEdge</strong> database. The r-code <strong>for</strong> a<br />
<strong>Data</strong><strong>Server</strong> application contains as text portions of <strong>SQL</strong> statements that the <strong>Data</strong><strong>Server</strong> passes<br />
to the data source.<br />
FOR statements<br />
FOR FIRST and FOR LAST statements that cause the <strong>Data</strong><strong>Server</strong> to sort data be<strong>for</strong>e returning it to<br />
the client behave differently when returning data from a MS <strong>SQL</strong> <strong>Server</strong> data source than when<br />
returning data from an <strong>OpenEdge</strong> database. The data source might not sort data like the<br />
<strong>OpenEdge</strong> database does, so the order in which records return might differ. In addition, the<br />
server-side result set is limited to a single record to improve per<strong>for</strong>mance.<br />
Features and language differences<br />
The <strong>Data</strong><strong>Server</strong> supplies you with complete ABL functionality when accessing MS <strong>SQL</strong> <strong>Server</strong><br />
data sources. Many ABL language elements (statements, functions, and so <strong>for</strong>th) and <strong>Data</strong><br />
Dictionary features work the same whether your application accesses a data source through the<br />
<strong>Data</strong><strong>Server</strong> or an <strong>OpenEdge</strong> database.<br />
Use the DBRESTRICTIONS function to find out which <strong>OpenEdge</strong> features your MS <strong>SQL</strong> <strong>Server</strong><br />
data source does not support. For the <strong>Data</strong><strong>Server</strong> <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong>, DBRESTRICTIONS can<br />
return SETUSERID and COUNT–OF. In certain circumstances, it can return additional values. For<br />
example, it can return READ–ONLY if you connect to the schema holder in read-only mode. See<br />
the “DBRESTRICTIONS function” reference entry in <strong>OpenEdge</strong> Development: ABL Reference<br />
<strong>for</strong> in<strong>for</strong>mation on syntax.<br />
Table 2–15 summarizes ABL differences between <strong>OpenEdge</strong> databases and MS <strong>SQL</strong> <strong>Server</strong><br />
data sources.<br />
Table 2–15: ABL differences between <strong>OpenEdge</strong> <strong>Data</strong>bases and MS <strong>SQL</strong><br />
<strong>Server</strong> data sources (1 of 2)<br />
<strong>OpenEdge</strong> feature MS <strong>SQL</strong> <strong>Server</strong> data source difference<br />
CONTAINS operator This operator relates to word indexing, which the<br />
<strong>Data</strong><strong>Server</strong> does not support.<br />
COUNT–OF function The <strong>Data</strong><strong>Server</strong> does not support this function.<br />
CREATE statement Records that you create after opening a cursor<br />
might be invisible to that cursor.<br />
FIND statements<br />
FOR EACH statements<br />
OPEN QUERY statement<br />
MATCHES function<br />
BEGINS function<br />
To reduce the number of records included in the<br />
results set, qualify your FIND statements and<br />
queries with a WHERE clause.<br />
The <strong>Data</strong><strong>Server</strong> does not support using the percent<br />
(%) or underscore (_) character with the MATCHES<br />
and BEGINS functions. Do not use these functions<br />
with a pattern that is not an expression.<br />
Note: It is theoretically possible to do this with an<br />
<strong>OpenEdge</strong> database, but using this kind of criteria<br />
results in poor per<strong>for</strong>mance.