|
Hi, I have as follow: String q = "from Car where " +"((car=:car" + " and "+"(:fromDate <= toDate and :toDate >= fraDate)" +")" +" and " +"driver=:driver)";
In my program parameters car, fromDate, toDate, driver will be changeable. I cannot hardcode them in the qury. I know that in SQL query I should use ? tag and to do something like follow: query.setDate("fromDate ", from); query.setDate("toDate", to); query.setEntity("car", car); query.setInteger("driver", 0);
Can somebody advise me.
Regards, Rafal -- You received this message because you are subscribed to the Google Groups "JPassion.com: Web Programming Basics" 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/jpassion_web?hl=en. |
- [jpassion_web] Lesson 13->SQL Tags Tim Puchala
- Re: [jpassion_web] Lesson 13->SQL Tags Tim Puchala
- [jpassion_web] SQL Rafał Laczek
- [jpassion_web] Disabled dates in calendar Rafał Laczek
