using buildxquery

i am using to fill a dataset using the taminodataadapter. i keep getting the following exception thrown from adapter.fill:

TANPIE0001: FillUpdateable operation failed: INOXQE6321: Runtime type exception: invalid node-type. : Expected NodeType: document.

here is a piece of the code:

Dim adapter As TaminoDataAdapter = New TaminoDataAdapter(mURL, mCollection)
adapter.Behavior = TaminoAdapterBehavior.UpdateByItemMapping
Dim taminoQuery As TaminoQuery = TaminoXQueryBuilder.BuildXQuery("", xquery, _
Dim fillCount As Integer
adapter.Query = taminoQuery
fillCount = adapter.Fill(taminoDS)

if i change the adapter behavior to readonly, it will work. but, i need to be able to update.

does anyone have any idea what this error means?

are there any examples of using buildxquery with a prolog parameter other than null?

are there any examples at all?

Did you have a look at the documentation under:

Tamino APIs ->
Tamino API for .NET ->
Programming with the Tamino API for .NET

especially under:

Working with Datasets and the TaminoDataAdapter

I think there are only C# samples but they are fairly trivial.

I think that the prolog is intended for anything that may precede the query expression proper (e.g. namespace declarations).