Maps a single scalar column of a stored procedure result set to a scalar set return value of a member mapped with the <StoredProcedure/> element.
<Member name="member" [signature="parameterList"]>
<StoredProcedure dbName="stored-procedure">
<Result>
<ScalarResultBindertargetType="clrType"
(columnIndex="index"|
columnName="name") />
</Result>
</StoredProcedure>
</Member>
clrType: Type to populate to the member result set. The return type of the member usually is Set<clrType>.
index: Zero-based index of the column in the stored procedure result set from which to retrieve the value.
name: Column name of the stored procedure result set from which to retrieve the value.
Either columnIndex or columnName has to be specified.
To map more than one column of a stored-procedure result set, use <CompositeResultBinder/>.
public abstract Set<Guid> GetOutOfStockProductIds();
can be mapped as
<Member name="GetOutOfStockProductIds">
<StoredProcedure dbName="GetOutOfStockProductIds">
<Result>
<ScalarResultBinder targetType="Guid" columnIndex="0"/>
</Result>
</StoredProcedure>
</Member>
The mapping above assumes the existence of a stored procedure GetOutOfStockProductIds that returns a result set with Guid in the first column.
Editions:Professional, Evaluation, Express
Database Platforms:Microsoft SQL Server 2000, Microsoft SQL Server 2005, Oracle 9i Release 2, Oracle 10g Release 2
<StoredProcedure/> element, <PersistentResultBinder/> element, <CompositeResultBinder/> element
| <StoredProcedure> Element | <PersistentResultBinder> Element |