MarkLogic XCC/.Net Library |

# Session.NewAdhocQuery Method (String, RequestOptions)

Create a new AdhocQuery object and initialize it with the given query string and RequestOptions object.

[Visual Basic]
Function NewAdhocQuery( _
ByVal queryText As String, _
ByVal options As RequestOptions _
) As AdhocQuery
[C#]
AdhocQuery NewAdhocQuery(
string queryText,
RequestOptions options
);

#### Parameters

queryText
  The ad-hoc XQuery code to be evaluated.
options
  An instance of RequestOptions to be set on the return AdhocQuery object. This can be overridden later.

#### Return Value

An initialized instance of AdhocQuery.

#### See Also

Session Interface | Marklogic.Xcc Namespace | Session.NewAdhocQuery Overload List