I changed the codes to the following:
.........
qPostings.declareParameters("int id");
        try {
                List<Postings> res = (List<Postings>)qPostings.execute
(new Long("5492"));
..........

but it doesn't still work.

is it GAE server's fault?



On Jul 9, 2:41 am, looking <[email protected]> wrote:
> PersistenceManager pm = PMF.get().getPersistenceManager();
>         Query qPostings = pm.newQuery(Postings.class);
>
>         qPostings.setFilter("account_id == id");
>         qPostings.declareParameters("Integer id");
>         try {
>                 List<Postings> res = (List<Postings>)qPostings.execute(5492);
>                 if(res.iterator().hasNext()) {
>                         for(Postings e : res) {
>                                 out.print(e.getAccountId() + "<br />");
>                         }
>                 }
>                 else {
>                         out.print("no results");
>                 }
>         }
>         finally {
>                 qPostings.closeAll();
>         }
>
>         pm.close();
>
> the above is my codes.
> when I runhttp://lookingforfour.appspot.com/in the IE, this error
> occurs:
> Error: Server Error
> The server encountered an error and could not complete your request.
>
> If the problem persists, please report your problem and mention this
> error message and the query that caused it.
>
> BTW,
> when I do a search in datastore of the admin console, and GQL is
> "SELECT * FROM Postings WHERE account_id = 5492", it works.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to