cancel
Showing results for 
Search instead for 
Did you mean: 

EJB QL and Date again..

Former Member
0 Kudos

Hi,

I've searched the forum for the problem with EJB QL and Date fields, but unfortunately I couldn't find any reasonably good solution.

The thing is, I have a database (created as a Dictionary project in NetWeaver) and a table with two Timestamp columns. Now I need a finder method:


SELECT object(ti) FROM TimeIntervalBean ti
WHERE  ti.time_from = ?1 and ti.time_to = ?2

but that doesn't work, i get:

<i>"EJB QL statement is invalid. See General User Output View for details."</i> (BTW, why for Gods sake is the General User Output empty?! Thats so annoying).

The parameters are java.sql.Timestamp. I've tried them all, java.lang.Date, and java.sql.Date too.

What's the solution?! Please don't tell me to store the date in a long field, that's kind of ridiculous - I'd have to convert this field a lot of time in my code, I don't like this idea.

Thanks for any help

--

Regards,

Kornel

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Pass the two parameters in string format.

regards,

Kiran

Former Member
0 Kudos

Hi,

Why not just creating another 2 additional columns in Java Dictionary table in long format, while still maintain the timestamp for display? Ur search will base on long columns.