Hi

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.

Thanks
Paidi

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.

Hi

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.