Neil Barton

Ranch Hand
+ Follow
since Aug 24, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
10
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 Neil Barton

Thanks Carey, you are a legend. I've looked at this for 2 hours and didn't see it!
No. It crashes as soon as it tries to execute the executequery statement.
They are both int. The table definition says int(11), the id in the class is just an int. I hope you can see what I'm doing wrong!!
I am trying to use the MySQL PreparedStatement. I have used them previously and they work, I have compared my new code to working code, they look the same but the new one doesn’t work.

Code:


When I run this the executequery line gives the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1

So it looks like the setInt didn’t work. I tried setting it using setString as well but that didn’t work either. Obviously if I print the pSQL string out I get “Select * FROM result WHERE CID = ?”, I looked at printing it out using debuggablestatement but that seems really complicated and I’m not convinced that it would get me any further.
Thanks Folks,
Carey, you're right, I mistyped a bit copying it from the other PC!
I thought it was impossible, I wondered if rollup or something similar might help but if you say it's impossible as well I'll give up and write some code to do it.

Thanks again,
Neil
3 months ago
I am trying to summarise some results data to assess what is more important. I have taken a few of the attributes but there are a lot.
I have a table that looks like this:
Time TakenQs AttemptedDisallowedResult
4601
6711
5600
5601
4500
6700

What I want is a summary showing the importance of each attribute where the result was a pass (result = 1):
Time TakenCountQs AttemptedCountDisallowedCount
415102
516211
6171

I can do this by submitting a separate query for each attribute and grouping on it, but can I do it in one go as shown in the second table. I need to sum the result column for each of the other columns, is this possible?
3 months ago
Thanks Tim, Yes, I'm working with Netbeans IDE, and I think that was the culprit. Thinking back I remember using the Netbeans 'move' facility to move a project around. It seemed OK at the time but it was about an hour later that the problems started. I think it corrupted the file structure somehow. I tried everything, even changing the permissions to everyone full control but it made no difference. What I did was to export all of the modules out, create a new folder and import them back in (took a while). After a little tweaking all is now working again.
I may be a bit hesitant about using the Netbeans 'move' facility in future!
4 months ago
I just tried to create a new ANT project, it fails to create it and leaves me at the 'Create project' screen. There is no error message. If I try to create a maven project it fails again and leaves me on the same screen but this time it gives the error message "Called DataObject.find on null" I'm not sure how I get it working again! Any help appreciated.
4 months ago
Sorry Rob, that was me, I was trying to show that it didn't matter what module name was in there they all fail to compile with the same error message. I have tried : switching the PC off. Checking for locks. Upgrading Netbeans to V20. Still it persists, nothing compiles with this same error. I have tried deleting every file it says it can't delete only to get to the point where all folders under the target folder are deleted when it says it can't delete them (took a while), when even the target folder is removed it responds with:  Central: Error while storing the mojo status: F:\Javadev\Parent\Central\target\maven-status\maven-compiler-plugin\compile\default-compile\inputFiles.lst -> [Help 1]
4 months ago
Sorry Marshal, How do I move it to another forum? I'm guessing Java General (is there a maven specific?). It's happening again so I need to work out what's causing it.
4 months ago
Thanks Ron, not as far as I know. As I said I rebooted the PC in the end and it was still doing it. One thing to throw in the mix: I have recently started using the Reflect library to get a value. That is mentioned in the output dump. The notes say not to use Reflect for a live system (but there's no alternative) could this be a symptom of Reflect not behaving itself?
4 months ago
and then...just like that... it all started working again. I didn't edit anything, didn't change anything. Just rebuilt another module and everything now cleans and compiles. I just love Maven :-(
4 months ago