| Author |
How to fetch date from database in JDateChooser field
|
Fahim Khan
Greenhorn
Joined: Nov 08, 2012
Posts: 2
|
|
Hi,
I have created simple form in swing. Which uses JCalendar.
I am trying to view the data from database on the basis of id. All other field are listing fine except date field. Which is JDateChooser component.
I am using below code to set the field.
Thanks in advance
|
 |
Kemal Sokolovic
Bartender
Joined: Jun 19, 2010
Posts: 792
|
|
Hello and welcome to the Ranch!
Can we see the exception message you are getting? I guess tfdob is JDateChooser component?
|
The quieter you are, the more you are able to hear.
|
 |
Fahim Khan
Greenhorn
Joined: Nov 08, 2012
Posts: 2
|
|
Yes, it is JDateChooser componet.
I am getting SQLException from line tfdob.setDate(rs.getDate("DOB"));
I think I got the solution I have defined DOB as String in database that may causing exception
|
 |
 |
|
|
subject: How to fetch date from database in JDateChooser field
|
|
|