InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: problem with Date function


I changed the return type to Integer & it seems to be working !!!
but wondering why it fails for Timestamp?
It should be working for Timestamp as well.

-alok

Alok Daipuria wrote:

> I wrote a function "getdate" which returns current time as java.sql.Timestamp
> object.
> I can use "NOW" for current time in InstantDB but I am trying to port my
> application from Sybase to InstantDB and the application uses Sybase getdate
> function. I want to avoid touching the queries as they are quite complex.
>
> when I run the query :
>           select * from UserEvent where StartDate < getdate()
>  I get following exception :
>     main java.lang.ClassCastException: java.sql.Timestamp
>     java.sql.SQLException: java.sql.Timestamp
>         at db.SQLProg.execute(SQLProg.java:276)
>         at jdbc.idbStatement.execute(idbStatement.java:235)
>         at commsql.main(commsql.java:74)
>
> but if i run select * from UserEvent where StartDate < "2000-05-19 23:59:59.0",
>   it works.
>  I also tried returning String in getdate(), but didn't work
>
> Any clues?
>
> -alok
>
> -----------------------------------------------------------------------------
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.

--
-alok
alok@yack.com


-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.