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


Alok

Try returning a java.util.Date. If that doesn't work then send me your
getDate code.

Regards

Peter Hearty
Lutris Technologies UK


-----Original Message-----
From: owner-instantDB@Enhydra.ORG [mailto:owner-instantDB@Enhydra.ORG]On
Behalf Of Alok Daipuria
Sent: 19 May 2000 23:56
To: instantDB@enhydra.org
Subject: InstantDB: problem with Date function


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.


-----------------------------------------------------------------------------
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.