Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

luke lukes

Greenhorn
+ Follow
since Feb 04, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by luke lukes

hi everyone. i'm trying to retrieve data from SQLite JDBC for a little desktop application. I have a table LETTURE created with:

now, while the insertion is quite a flawless process with (example):


retrieve data via JDBC, so through a ResultSet, it's quite problematic:

what i find on rs.getDate("data") is always 01/01/1970. Note that the date is correctly inserted on db, in fact i can retrieve it correctly using shell:


i've tried also to create the table using TIME instead of DATE as datatype for 'data' column, and retrieving data with both rs.getData("data") and rs.getTime("data"), but the result is always the same: 01/01/1970. do you know if maybe i use the wrong type in java (Date instead of something else)?

thanks
LuKe
it doesn't work. here is the pseudocode:


after closing the window for insert a new user, new items are not displayed in the combobox...



10 years ago
hi everyone. i'm trying to develop a little application in which there's a JComboBox that is initialized at start with some elements, retrieved from db: these data are inserted in object, object in a LinkedList, and from this a String array is retrieved to populate the JComboBox. I've added a button that, once clicked, open a JOptionPane in which new data can be added, after that elements are written on db, and the JOptionPane quit. After that, the Linked List above is refreshed, retrieving data from db including new data, and the same procedure of start is repeated for populating JComboBox, but new elements (or also removed elements) are not showed. what can i do?
thanks
LuKe
10 years ago