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.

FIND customer WHERE ROWID(customer) EQ ?.<br />

ABL issues<br />

• If you <strong>for</strong>ce the creation of a record be<strong>for</strong>e entering the value <strong>for</strong> the designated<br />

column (<strong>for</strong> example, by committing a transaction or releasing or validating a<br />

record), the creation fails if the column cannot have NULL values. If the column can<br />

have NULL values, the <strong>Data</strong><strong>Server</strong> assigns the new record a ROWID of NULL.<br />

However, if the column has an initial value, the <strong>Data</strong><strong>Server</strong> creates the row with<br />

that initial value as the ROWID.<br />

Follow these guidelines when using ROWID in applications that you want to deploy<br />

across multiple <strong>OpenEdge</strong> databases and/or MS <strong>SQL</strong> <strong>Server</strong> data sources:<br />

• Do not try to get a record’s ROWID value be<strong>for</strong>e the user assigns values to the<br />

unique keys of the record.<br />

• Refresh the ROWID value if a value of a unique key might have changed.<br />

Refresh the ROWID value after you undo a DELETE. The ROWID value might be<br />

different after the record is recreated.<br />

• ROWID values are stable <strong>for</strong> a session, but you cannot rely on them to be the same<br />

across sessions.<br />

Note: Reposition functions such as REPOSITION-BACKWARDS and<br />

REPOSITION-TO-ROW typically use ROWID to identify records. Functions of this<br />

type require integer expressions, which can be either INTEGER or INT64.<br />

For a complete description of the ROWID function, see its reference entry in <strong>OpenEdge</strong><br />

Development: ABL Reference.<br />

RECID function<br />

For backward compatibility, the <strong>Data</strong><strong>Server</strong> supports the RECID function <strong>for</strong> MS <strong>SQL</strong><br />

<strong>Server</strong> data source tables that have a unique 4-byte integer column defined as the key<br />

<strong>for</strong> the ROWID/RECID index of a given table in the schema holder. Whenever the ROWID<br />

index selection <strong>for</strong> a schema holder table in the Dictionary has multi-component key<br />

composite or is a single-component key but not a single unique integer component, the<br />

RECID function is not supported and the compiler will disallow the use of the RECID<br />

function in a WHERE clause.<br />

Note: The ROWID function does not have this same restriction and is the<br />

recommended alternative <strong>for</strong> this limitation.<br />

When the Create RECID Field option is selected, the <strong>OpenEdge</strong> DB to MS <strong>SQL</strong> <strong>Server</strong><br />

migration utility creates an indexed column with unique values <strong>for</strong> each row called<br />

PROGRESS_RECID. Starting with <strong>OpenEdge</strong> Release 10.1B, the field is defined as<br />

bigint and in Release 10.1A or earlier, the field is defined as integer. You can also<br />

add this column to tables manually if you are using an existing MS <strong>SQL</strong> <strong>Server</strong><br />

database or if you ported an <strong>OpenEdge</strong> database without the Create RECID Field<br />

option selected.<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> 111

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

Saved successfully!

Ooh no, something went wrong!