Project: Birt
Bug 117615 ODA Consumer should handle Unsupported exception of oda.IQuery.GetParameterMetaData()
Reported: 2005-11-22 21:00:29 | Status: resolved fixed

If an ODA driver is not capable of providing the metadata of a query's parameters, it may throw an UnsupportedOperationException or return null in its IQuery.GetParameterMetaData() method implementation. These 2 different types of response have no functional difference from the BIRT consumer perspective. Either way, it means that an ODA driver has no parameter metadata, and it is up to an user to manually define the metadata via the BIRT Data Set Editor. Therefore, the BIRT Data Engine odaconsumer should encapsulate the differences to make it easier for other BIRT components to handle. In other words, the odaconsumer should catch the UnsupportedOperationException from IQuery.GetParameterMetaData(), and instead returns a null parameter metadata to its caller. This way, its caller will only need to check for null parameter metadata to proceed. Note that an ODA driver may support the use of parameters, but yet not capable of providing metadata on the parameters. Thus, returning a null parameter metadata is independent of whether an ODA driver supports the use of query parameters at run-time, specified via the oda.IDataSetMetaData interface.

Files changed in fix:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/odaconsumer/PreparedStatement.java