N. America: (800)876-3101 | World: +44 (0) 1-344-386-367

Tutorial: Resolving fn:collection() Errors DataDirect XQuery

No standard way exists to access a relational table in XQuery, so each XQuery implementation defines its own way to do this. DataDirect XQuery uses fn:collection() to access a relational table. For example, the following query accesses the HOLDINGS database table:

collection('HOLDINGS')

Generally, DataDirect XQuery processes fn:collection() arguments in XQuery queries without problems if the fn:collection() argument is correct and the connection information specified in the connection associated with the XQuery query is correct. When DataDirect XQuery cannot resolve the fn:collection() argument to a specific database object, it raises an error.

This paper provides guidelines to help you troubleshoot and correct common causes of errors that occur when using fn:collection() in an XQuery query.

Guidelines

When DataDirect XQuery cannot resolve the fn:collection() argument to a specific database object, it raises an error, such as Collection not found or Multiple collections found.

Checklist

If you encounter an error when using fn:collection() with DataDirect XQuery, examine the checklist to resolve the problem.

Email Print Share

Resolving fn:collection() Errors

Progress DataDirect Resource Library If you like this Tutorial, you'll love the others!

Be sure to visit the Progress DataDirect Resource Library regularly because we are continually adding new Tutorials.