You need to do it like this:

  query.declareParameters("Long bind_pocId, Date bind_startDate, Date
bind_endDate");

However, unless you've normalized your dates on midnight or something I
don't think this will work they way you want since date objects have
millisecond precision.

On Wed, Dec 29, 2010 at 7:46 AM, Vik <vik....@gmail.com> wrote:

> Hie
>
> I am trying to pass multiple parameters as follows
>
>       Query query = pm.newQuery(PocVacationSchedule.class);
>          query.setFilter("pocId == bind_pocId && startDate ==
> bind_startDate && endDate == bind_endDate");
>          query.declareParameters("Long bind_pocId");
>          query.declareParameters("Date bind_startDate");
>          query.declareParameters("Date bind_endDate");
>  List<PocVacationSchedule> rulesList =
> (List<PocVacationSchedule>)query.execute(pocId, startFrom, endFrom);
>
> And it throws exception passed 3 parameters where query is expecting 1.
>
> So, what I am doing wrong here?
>
>
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to