I think you get better help in a ODBC forum, but I think the problem might be
related to how some Microsoft databases keep their date formats.
I have included a little code fragment that I use either for Access or SQL
Server. I would think that FoxPro is now similar

      SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
      textQuery = "SELECT DateEntry, Title, Entry from Entry WHERE (DateEntry >=
 {ts '"+
      sdf.format(date).toString()+"'}) ORDER BY DateEntry DESC;";

If it is an issue witht the date format, I am sure Symantec would have the
solution in a FAQ on their site. It probably be a common issue. I
have not seen dbAnywhere, since I first played with java long time ago. I hope I
 was helpful. Good Luck!








Yulyanto <[EMAIL PROTECTED]> on 01/14/2000 02:14:08 AM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>








 To:      [EMAIL PROTECTED]

 cc:      (bcc: Thermond Adams/FRB12)



 Subject: out of topics: JDBC - passing date parameter









hi all,

I got this error message in dbAnywhere :

947844712 Select dmhdatein from mrtrxhd where between(dmhdatein,?,?)
947844712 Select dmhdatein from mrtrxhd where between(dmhdatein,{ D
'1999-08-01' },{ D '1999-09-01' })
947844712 [Microsoft][ODBC Visual FoxPro Driver]Datetime field overflow
947844712 Error: SQL9999
    Message: [Symantec][dbANYWHERE Server][Version: 1.1 - Build:
215][SQL][Statement]Database engine or client library specific
error encountered.
    DBMS SQL state: 22008
    DBMS message: [Microsoft][ODBC Visual FoxPro Driver]Datetime field
overflow
    Suggestion: Please see the specific database's vendor supplied manual(s)
for further information concerning this error.
947844714 Error: SQL9999
    Message: [Symantec][dbANYWHERE Server][Version: 1.1 - Build:
215][SQL][Statement]Database engine or client library specific
error encountered.
    DBMS SQL state: 22008
    DBMS message: [Microsoft][ODBC Visual FoxPro Driver]Datetime field
overflow
    Suggestion: Please see the specific database's vendor supplied manual(s)
for further information concerning this error.

what's wrong with that ???

thanks.

regards,
yulyanto


----- Original Message -----
From: Swapnil Deshmukh <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 14, 2000 1:47 PM
Subject: Re: out of topics: JDBC - passing date parameter


> Hi,
>
> I got the same error,
> oracle and java documentation says that the java.sql.Date class maps
> onto the oracle date field directly using setDate method,
> however it gives the error that the date is entered in
> YYYY-MM-DD format instead of DD-MON-YYYY(which is default oracle format)
> whats going wrong?
>
> thanks,
> Swapnil
>
>
> > Yulyanto wrote:
> >
> > Hi all,
> > I want to know how to passing date as parameter in PreparedStatement
> > object.
> > Database used VFP and the JDBC Driver is dbAnywhere version 1.1.
> > I always got error message in my ODBC driver,
> > my code is like this :
> >
> > PreparedStatement pstmt = con.prepareStatement("Select * from mrtable
> > where between(chickin,?,?)");
> > pstmt.setDate(1,new java.sql.Date(99,5,1));
> > pstmt.setDate(2,new java.sql.Date(99,6,2));
> > ResultSet rs = pstmt.executeQuery();
> >
> >
> > thanks,
> >
> > regards
> >
> > yoel
> >
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to