Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!

denis sorn

Ranch Hand
+ Follow
since Apr 30, 2008
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 denis sorn

You could eventually use Session merge method. I.e. .

[EDIT]

Forget it. I have not read what you wrote. Sorry.

Hi both,

first sorry for the misguidance. As Shobhit said you can not reuse same ResultSet Object. What I actually meant you can reuse a reference.

And you don't have to create two Stramenet objects. This works for me:

Well yes. You can also use one ResultSet object with different queries.
Are you trying to do that as root? If yes could be that root doesn't have right to start/run X applications.
Check "Beginning POJO's from Novice to Professional-Apress". It looks nice, I am still reading it.
I never worked with oracle, but maybe I had similar problem with MySQL and INNODB engine. The problem was that innodb logs each insert. Because mysql and innodb support multiple inserts with one command I ended with creating big SQL statement (with StringBuffer) which inserts 30 40k rows at once.
11 years ago
I presume he wants to be able to change parameters dynamically...

If this is what you want Shumani you can do it with PreparedStatement.
Java Server Pages have nothing to do with mysql. You can google for 'jdbc mysql' and you'll find a lot of quick starter tutorials about how to get and use mysql connection from java code.

You can then use the same method to obtain data in your servlet.
Don't know for JPA, I have worked only with jdbc, but for Connection Pooling I suggest you try MiniConnectionPoolManager.
11 years ago
free -m doesn't give data for hard disk but for RAM and swap if you have swap partition or swap file. you need df command.
11 years ago
Something like this? That works with MySQL not sure for other DBMS.
You have to override isCellEditable method in TableModel. If you want to make all cells uneditable this would work:

11 years ago
You can add a MouseAdapter with addMouseListener to the table. In MouseAdapter class implement mousePressed method i.e. like this:



I am not sure if this is what you want but I suppose with selected row and column you should get your cell.

edit:

Yes, forgot to say, this method will only work then when you use mouse to select the cells.
11 years ago
Does Availability have to be boolean type or you can choose another? You could maybe use it as a reference to a member who has borrowed the book, if null or 0 the book is available? And you could use 'Books' from the Member Table as a history containing books borrowed by that member?

Then when you want to know which books are borrowed by that member you would search Books table for his ID (Availability).