Hi,
Maybe JDBC is more Y2K compliant than M$ Access and doesn't let you do quite silly 
query for year 100? Eg. for year==2000:

 java.sql.Date dateFrom=new java.sql.Date(year-1900, month-1, day);

Best regards,
Piotr

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of ray
Sent: Thursday, June 29, 2000 23:42
To: [EMAIL PROTECTED]
Subject: [JSP-INTEREST] Query Ms Access with SetDate() Function Failed


hi,

i try to make a query in servlet to Ms Access
with date condition

e.g.:

java.sql.Date dateFrom=new java.sql.Date(year-1900, month-1, day);
java.sql.PreparedStatement st =conn.prepareStatement("Select... =?);
st.setDate(1, dateFrom);

The problem is i coudn't get the result as i got when i do the query
directly in Ms Access Query.

How can i sovle this problem

thanks

ray

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to