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.

ABL issues<br />

When you run find.p with an <strong>OpenEdge</strong> table and a MS <strong>SQL</strong> <strong>Server</strong> table, you get the<br />

following results (assuming that the database has records <strong>for</strong> customer numbers 1 through 4):<br />

If the FIND PREV statement fails, the cursor remains located after customer.custnum 3 in the<br />

<strong>OpenEdge</strong> table, which was the last record scanned. In the data source table, the cursor is<br />

positioned at custnum 2. Failed finds do not affect cursor position in data source tables.<br />

Compiling <strong>OpenEdge</strong> procedures<br />

The COMPILE statement lets you compile ABL procedures and save the compilations to disk.<br />

This speeds up your application execution time since the application does not have to recompile<br />

it every time you want to run a procedure.<br />

To compile procedures that access a MS <strong>SQL</strong> <strong>Server</strong> data source, start up an <strong>OpenEdge</strong> session<br />

and connect to the schema holder using the schema holder’s logical database name, then use the<br />

COMPILE statement. If you change the name of the schema holder after you compile a procedure,<br />

you must connect to the renamed schema holder and recompile the procedure. For more<br />

in<strong>for</strong>mation, see the “COMPILE Statement” reference entry in <strong>OpenEdge</strong> Development: ABL<br />

Reference.<br />

Note: You do not have to connect to the MS <strong>SQL</strong> <strong>Server</strong> database to compile a procedure.<br />

The schema holder contains all the in<strong>for</strong>mation that the compiler requires.<br />

R-code<br />

OPENEDGE DATABASE RESULT<br />

2<br />

MSS DATA SOURCE<br />

RESULT<br />

R-code is generated when an ABL procedure is compiled. The compiled r-code is portable<br />

among machines. For example, r-code that you compile on a Sun machine can run on any other<br />

UNIX machine.<br />

R-code is also not portable among windowing systems; that is, r-code compiled <strong>for</strong> a character<br />

application will not run under Windows and r-code compiled <strong>for</strong> Windows will not run under a<br />

character application.<br />

R-code is also not portable among database management systems. ABL generates calls that are<br />

specific to a database. For example:<br />

• Code that you compile <strong>for</strong> a database named sports will not run with a database named<br />

mysports.<br />

• Code that you compile <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong> will not run on an <strong>OpenEdge</strong> database.<br />

See <strong>OpenEdge</strong> Deployment: Managing ABL Applications <strong>for</strong> more details on r-code portability.<br />

2<br />

2–57

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

Saved successfully!

Ooh no, something went wrong!