Version

BindStatement Method

Binds placeholders in an arbitrary query statement to replacement values specified by the DataBindingCollection for the current fetch/update operation.
Syntax
'Declaration
 
Protected Function BindStatement( _
   ByVal context As OperationContext, _
   ByVal commandSequenceNumber As Integer _
) As String
protected string BindStatement( 
   OperationContext context,
   int commandSequenceNumber
)

Parameters

context
An operation context that defines the template text for the query statement and any placeholders appearing in curly braces.
commandSequenceNumber
A nonnegative number identifying which step in a multi-step context is that statement to bind against. The calling logic will normally loop through the steps sequentially, incrementing a counter running each statement necessary to fulfill an operation (fetch or update).

Return Value

A query statement
Remarks

The query language of statements bound by BindStatement is meant to be independent of data source. Therefore, it can be used to bind against SQL queries, XPath expressions, or LINQ statements. One requirement is that the OperationContext provide the template text with placeholders matching the names of members on collected ScheduleDataBinding objects, which will be replaced by calling this method.

This method has no effect on command statements that are the names of stored procedures. This dynamic data binding facility does support data providers using stored procedures (you must alter the stored procedure and rebuild to take advantage of different field names.)

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also