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

Reply via email to