users@glassfish.java.net

Re: Help me : about ReadAllQuery and Vector argumants

From: <glassfish_at_javadesktop.org>
Date: Tue, 20 Nov 2007 20:57:39 PST

Hi

I have solved it.

> <snipped>
> // First define the query
> ReadAllQuery theQuery = new ReadAllQuery();
> theQuery.setReferenceClass(Table0011.class);
> theQuery.setEJBQLString("SELECT OBJECT(o) FROM Table0011 o WHERE o.col2 = ?1");

theQuery.addArgument("1"); //<- added this line

>
> // Next define the Arguments
> Vector<String> testArguments = new Vector<String>();
> testArguments.add("value1");
>
> // Finally execute the query passing in the arguments
> Vector returnedObjects
> = (Vector)serversession.executeQuery(theQuery, testArguments);
>
> <snipped>

Thank you!
[Message sent by forum member 'wildrose99' (wildrose99)]

http://forums.java.net/jive/thread.jspa?messageID=246456