IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 1 reply
  • Latest Post - ‏2012-09-03T13:02:24Z by VNQB_Jean-Francois_Contour
VNQB_Jean-Francois_Contour
10 Posts

Pinned topic queries over in-memory Java collections : Doesn't work ?

‏2012-09-03T09:07:15Z |
I try to query over a Java Collection which is a result of a previous query like in the sample here :
http://publib.boulder.ibm.com/infocenter/idm/v2r1/index.jsp?topic=/com.ibm.datatools.javatool.runtime.doc/topics/cpdqrunqrycol.html

Integer countCity = qocdata.queryFirst(
"SELECT COUNT(*) FROM ?1.com.company.Customer AS cr WHERE cr.storeRegion = ?2",
Integer.class, customers, sanFranCode );

I have a syntax error on the previous line of Java code : comma expected instead of dot (dot between com and company in the full class name com.company.Customer)
If I remove the full class name and use Customer instead, I have a runtime ClassNotFoundException on Customer class

Did anybody tried the query over Collection feature ?

Thanks for help

My context :
  • Data Studio 3.1
  • DB2 z/OS
Updated on 2012-09-03T13:02:24Z at 2012-09-03T13:02:24Z by VNQB_Jean-Francois_Contour
  • VNQB_Jean-Francois_Contour
    10 Posts

    Re: queries over in-memory Java collections : Doesn't work ?

    ‏2012-09-03T13:02:24Z  
    It works fine with DB2Express, so I suspect it is related to the version of DB2 z/OS. We are using DB2 v9 in Compatibility Mode.