JDBC

I already make the conecction to Firebird and add a singleton , i made the graphic interface with CRUD functions but I can execute one function for example list, and the "This connection is closed and cannot be used now." appear , i need help plz i have like 1 day to finish
7 Replies
JavaBot
JavaBot3d ago
This post has been reserved for your question.
Hey @YY4NN! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
YY4NN
YY4NNOP3d ago
No description
fertiz
fertiz3d ago
make sure uou dont put the conmection inside try () bracket cause then it closes the Autocloseable after try catch block like in this case if you have sth like this: try (connection =...) or somwthing with connection inside gjis bracket, remove it from yhere
YY4NN
YY4NNOP3d ago
Thank you very much, although I'm still a little confused because I'm doing my work internship, but it's actually a requirement to graduate and I don't have much idea about programming, so I did it with an AI, I don't know if I could send you the code to find out
dan1st
dan1st3d ago
Note that you are probably not allowed to just share code you wrote for your company with others Essentially, a JDBC Connection object is valid only until you call the close() method on it you should call close() on it as soon as you don't need it any more (make sure to not forget about it) - but not before that Also make sure you are actually understanding all the code you are writing
YY4NN
YY4NNOP3d ago
Thanks, I'll see if I can finish the practice.
JavaBot
JavaBot3d ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts. 💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?