Don't you want ?1 instead of a1 or maybe 'a1'

Regards,
Adrian

On Mon, 2003-07-07 at 19:14, aaaa aaaa wrote:
> Hi,
>  
> I have a dynamic ql issue. Does anyone has working examples for
> dynamic-ql and share them with jboss -users? I am stuck with the
> following dynamic ql errors.
>  
> Thanks
>  
> J.P.
>  
> in the ejb-jar.xml, here is the piece:
>  <query>
>   <query-method>
>     <method-name>ejbSelectABCD</method-name>
>     <method-params>
>      <method-param>java.lang.String</method-param>
>      <method-param>java.lang.Object[]</method-param>
>   </query-method>
>   <ejb-ql/>
>  </query>
>  
> in the jbosscmp-jdbc.xml, here is the piece:
>  <query>
>   <query-method>
>     <method-name>ejbSelectABCD</method-name>
>     <method-params>
>      <method-param>java.lang.String</method-param>
>      <method-param>java.lang.Object[]</method-param>
>   </query-method>
>   <dynamic-ql/>
>  </query>
> -------------------------------------------------------------------
> In the program, I construct:
> String sql_str="SELECT OBJECT(obj) FROM xyzTable obj WHERE obj.f1 = a1
> AND obj.f2 = a2";
> and call jbSelectABCD(sql_str, new Object[]{});
> -----------------------------------------------------------------
>  
> the error log messages I got are:
>  
> DEBUG [ejbSelectABCD] DYNAMIC-QL: SELECT OBJECT(obj) FROM xyzTable obj
> WHERE obj.f1 = a1 AND obj.f2 = a2
>  
> ERROR [STDERR] javax.ejb.FinderException: 
> Error compiling ejbql: org.jboss.ejb.plugins.cmp.ParseException:
> Encountered "a1" at line1, column ...
> 
> Was expecting one of:
>  "CONCAT"
>  "SUBSTRING"...
>  
> ERROR [STDERR] at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.execute(JDBCDynamicQLQuery.java:74)
>  
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
> 
> 
> ______________________________________________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
-- 
xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to