##### Inserting a query

The following methods are used to insert a query into a catalog and to return the handle of the newly inserted query:

- insert(String qryName, QueryFieldInfo queryFieldInfo,QueryJoinInfo queryJoinInfo, QueryQBEInfo queryQBEInfo, QueryAndInfo queryAndInfo)
- insert(String dataSourceName, String qryName, QueryFieldInfo queryFieldInfo, QueryJoinInfo queryJoinInfo, QueryQBEInfo queryQBEInfo, QueryAndInfo queryAndInfo)

Parameters

- qryName - The query name.
- queryFieldInfo - The table and fields information.
- queryJoinInfo - The join information.
- queryQBEInfo - The QBE information.
- queryAndInfo - The where condition information.

Reference: For details about the classes QueryFieldInfo, QueryJoinInfo, QueryQBEInfo and QueryAndInfo, refer to the JReport Designer Javadoc jet.api package in `<install_root>\help\designer\api`, which includes all the documents generated by Javadoc.