I am currently doing a project, part of which involves reading peoples information into a Database, the table in question being member_table which includes a 'Date of Birth' field. I have no problem doing this as all the information I want to assign to this table including DOB is happening.

My problems arise when I interrogate the database. I am outputting my query to a jTable. The DOB field (which is a date field) is not being picked up and in fact the next column which is an address field occupies the DOB column. In other words the heading DOB appears but all the information moves one column to the left with the last column remaining empty, all because the DOB field is not being read from the database.

The SQL query is:
query = "SELECT * from Member_Table WHERE Member_Table.FirstName = 'jTextFieldFirstName.getText()' AND (Member_Table.Surname = 'jTextFieldSurname.getText()');

Anyone any ideas.


9 Years
Discussion Span
Last Post by pmhayden

Well, you're just failing to read the data from the resultset and set it to the right fields in your datastructure, and/or failing to map that field to a column in your jTable.

But as you don't tell us what you've actually done it's impossible to say which of those options (singly or in combination) you've failed to accomplish.

There is nothing automagic about it, YOU failed to do something.



thanks for the help. ur right I didn't give enough info in my question. However I found the ommission in a method that I had done weeks ago that read the different types from the ResultSet but not date types. So I was able to add the necessary code.

Thanks again

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.