MarkLogic XCC/.Net Library |

# Session.NewAdhocQuery Method (String)

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

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

#### Parameters

queryText
  The ad-hoc XQuery code to be evaluated.

#### Return Value

An initialized instance of AdhocQuery.

#### See Also

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