Jamie Wool

Ranch Hand
+ Follow
since May 03, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jamie Wool

I had a similar problem with copying data using the prepare statement, which turned out to be the way that the prepare statement adds single quotation marks to code. Also note the it uses '1' instead of true. See my code example below.

I haven't got Oracle installed at the moment so couldn't test exactly what oracle expects, so you will need to have a play. I would personally create a working statement manually in oracle, then experiment until the prepare staement to generate the exact same code.


The code




I hope this helps a bit?
Hey,
Is there any chance you could post some of the offending code and possibly details of the db. As the error says it suggest that it is receiving something unexpected/illegal in the data being passed to the db.

I've always found displaying the created sql command useful, sometimes helps debugging the sql statements.
Does that mean you can't compare java.sql.Date fields properly? I need the application to work out whether an item is out of date, so the precision is in terms days.

Also how do you write dates or timestamps through jbbc, as at the moment I have to use a sql based function like now(), because i simply get nulls if i attempt to pass a date. What i've been doing converting a java.util.Date to java.sql.Date, and passing that date across in the jdbc code? Is this not correct.
Hi all,
I'm having a few major issues with Date over jdbc.

i) when i read a date out from my mysql database it cast it into java.util.Date to store in an object(errors if i try to store as java.sql.Date). Later on i have major problems trying to compar this date object...



ii) the second probelm is writing date to the db through jdbc. I set the date from todays date, cast it to java.sql.Date but when i write it to the db. i get 00-00-0000 in the db

Obviosly there is somethign strange going on between java.util.Date and java.sql.Date. Any help would be appreciated.

Cheers
Hi all,
I have a java application created using Netbeans 5.0, which one of the goals is to create a Midlet on the fly for deploying to a mobile device. At the moment i have a seperate project for the main program and a test one for the midlet. I want to know whats the best way for my main application to be able to create/invoke a midlet using supplied data and launch using an emulator.

Cheers
19 years ago
Has anyone got any idea how to make netbeans start a jFrame up in full screen mode.

Have tried the usual:


Any ideas?
20 years ago
Managed to fix it, forced the page to load another empty html page and the reload. That flushed it out

20 years ago
I have jEditorpane that displays a html file, it works fine, but if the html file updates it won't reload with the updated version. Is there a way of forcing the jEditorPane to load the file

20 years ago
Here's the code that netbeans generates

salesBrowseResultsTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{new Integer(12), "Rose", "el rosia", "Goodhew", new Integer(56), new Float(6.99), "spato", "red", "Summer", new Integer(56), new Integer(12)},
{new Integer(16), "Tree", "el tree", "oak", new Integer(1), new Float(100.0), "treeus", "green", "summer", new Integer(1000), null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null},
},
new String [] {
"Shrub Id", "Shrub Name", "Latin Name", "Variety", "In Stock", "Price", "Genus", "Colour", "Flowering", "Height", "Width"
}
) {
Class[] types = new Class [] {
java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Float.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class
};
20 years ago
Getting an index out of bounds because the program is attempting to write to row 51 of a table with only 50 rows.
20 years ago
Hi all,
I have a jTable in netbeans, basically i have used the model feature to define the column headers and i create a set number of rows, say for this example 50. The problem i'm having is that this is pretty static and if i end up with more than 50 records i get an exception error. I could simple extented the rows but it seems a poor fix.

Is there a way to let the size of the jTable be changable, please remeber i'm using netbeans, so it's not so easy to edit the data directly.

Cheers

James
20 years ago
I have a program which generates a java applet window and want to make sure that the window is brought to the front. Currently the generated browse window moves to the top....

Any ideas?
20 years ago
20 years ago
Ok, i've figurd out the permissions problem, but still having problems with the code. With your example i no longer get the applet pop-up in a frame and it doesn't seem to add the background or the burttons?
20 years ago
Thanks for that, but that seems to have brought on securtiy exceptions when loading the applet.


java.security.AccessControlException: access denied (java.io.FilePermission images/skin1.gif read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
at sun.awt.SunToolkit.getImage(Unknown Source)
at javax.swing.ImageIcon.<init>(Unknown Source)
at javax.swing.ImageIcon.<init>(Unknown Source)
at AnImageComponent.<init>(JF1.java:42)
at JF1.init(JF1.java:15)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
20 years ago