Click or drag to resize

PreparedStatementBind Method

Creates a new BoundStatement instance with the provided parameter values.

You can specify the parameter values by the position of the markers in the query, or by name using a single instance of an anonymous type, with property names as parameter names.

Note that while no more values than bound variables can be provided, it is allowed to provide less values that there is variables.

You can provide a comma-separated variable number of arguments to the Bind() method. When providing an array, the reference might be used by the driver making it not safe to modify its content.

Namespace:  Dse
Assembly:  Dse (in Dse.dll) Version: 2.9.0
Syntax
C#
public virtual BoundStatement Bind(
	params Object[] values
)

Parameters

values
Type: SystemObject
The values to bind to the variables of the newly created BoundStatement.

Return Value

Type: BoundStatement
The newly created BoundStatement with the query parameters set.
Examples
Binding different parameters:
PreparedStatement ps = session.Prepare("INSERT INTO table (id, name) VALUES (?, ?)");
BoundStatement statement = ps.Bind(Guid.NewGuid(), "Franz Ferdinand");
session.Execute(statement);
See Also