Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Initial Programming Considerations : Database design issues : Indexes and sorting : Unique indexes
 
Unique indexes
If your MS SQL Server data source tables have at least one unique index, they can be used to support operations such as backward and forward scrolling and accurate cursor positioning through the FIND CURRENT, PREV, and LAST statements. If a table does not have a unique index, you can only scroll forward through its data.
If a MS SQL Server data source table does not have a unique index, you can designate an index to serve as the unique index for the schema holder. An index that you designate as unique in the schema holder must be unique with respect to the data in the data source, otherwise you receive runtime errors. See The DataServerTutorial for instructions on using the Data Dictionary to designate unique indexes.
MS SQL Server data source views and result sets from stored procedures do not have unique indexes. Just as for tables, you can use the Data Dictionary to create a unique index in the schema holder based on fields in a view or result set so that you can browse data accessed through views or stored procedures. For more information about views, see MSSQL Server data source views.
Note: Do not change the designated ROWID key of a record while an application is running. Suppose, for example, that custnum is a unique key and has been designated the OpenEdge ROWID. If a user changes the value of custnum for a customer from 1 to 111, other users receive an error message when they try to access the record for customer 1.