Dian,
The windows service solution wouldn't be practical and also it's unfamiliar territory for me.
What do you mean by "Implement a change listener and clear the app" - I can see how I can use a change listener and shut down the app when needed - it's the restart part that gets me.
How do you make a java application shutdown and automatically restart itself?
The reason for this is I have an application I maintain - it's run from a network drive and sometimes the users leave an instance running for months at a time. When I release an update I would like each instance to...
I was planning to write a small update app, it will be started by the autorun feature on windows. It will connect with the database and modify the table required, then copy a new application jar to the system. This will have all the modified pojo's etc.
I'm quite new to hibernate - how would I...
I'm trying to write an update app which needs to modify a table in the embedded Derby Db, but I get
java.lang.IllegalArgumentException: node to traverse cannot be null!
The code concerned is:
Query q = this.entityManager1.createQuery("alter table jobrecords add column enginesize int not...
He's not really solving the problem - all his refresh method does is delete everything from the List and then put it all back, in a way not really different from unbinding the table and then rebinding it.
snuv - did you find a solution? I've been contemplating doing something similar - use the node based gui from a file chooser to display data that isn't file or folder based.
I have a Jtable thats bound to a DB table. Sometime the database can be updated and the model of the table changes but the displayed data doesn't.
At the moment I have to cause a manual refresh by unbinding the table then rebinding it, which seems to me to be a really ugly solution.
Is there...
I've got a small test program set up to try and resolve this problem but I'm at a loss now. I have a jTable that has two columns - each of type double.
The table uses a cell editor that selects all the contents on edit. (it also disables the editing on a mouse click to prevent masking of the...
MONTH is the datadase function that returns an int representing the month from a date field. http://db.apache.org/derby/docs/10.4/ref/ref-single.html#rrefmonthfunc
The db table in question is very simple, no FK's just a few varchar fields and a couple of Date fields.
I think the bug is in the...
Hi,
I've got an embedded Derby DB and I use entity beans with namedqueries.
One of which is:
@NamedQuery(name = "Vehicles.findbymotmonth", query = "SELECT v FROM Vehicles v WHERE MONTH(v.lastmotdate) = :monthnumber")
If I use the IDE to send this command to the database it works fine...
I have a java entity class that is bound to a MS Access database using the persistance API.
The db has a table 'customers' with the primary key field set to autonumber. However, my entity bean does not update the pk correctly or at all (depends on what I set the GeneratedValue param to.
If I...
I'm writing a bit of code that uses win32 events quite a lot. I've been told that this introduces a lot of overhead and can be quite slow but I can't find any definative information on this. Does anyone have any opinions or information regarding overhead/performance when using events?
If your program takes the id and name of the school how exatly does it store these two bits of information in the vector? The vector can only store one object (either the id or the name) unless you are placing both of these into another object and then storing that.
In your code you just seem...
try something like
select item_number, count(*) from orders group by item_number
You can then refine this with ASC and DESC and LIMIT to get tht etop 10 sellers, the bottom 10 sellers etc.
Instead of using a vector have a look at using maps. With a map you have a key and a value. For you application the school id could be the key (assuming it's unique to each school) and the value could be the school name.
Maps contain methods such as containsValue and containsKey. You can use...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.