G
Grzegorz Stasica
Hi,
During updating my database I keep going receiving the same error caused
by formating integer by Java. The code is as follows:
...
...
stmt.executeQuery(MessageFormat.format("insert into tab (num) values ({0})",
new Object[] {new Integer(txtNum.getText())}));
The problem is that when in field txtNum the number is >999 java formats
the value to for example 1 234(mark space between 1 and 2). This cause
the db to throw errors since it's not a number. Could anybody tell me
how to avoid this.
Regards
During updating my database I keep going receiving the same error caused
by formating integer by Java. The code is as follows:
...
...
stmt.executeQuery(MessageFormat.format("insert into tab (num) values ({0})",
new Object[] {new Integer(txtNum.getText())}));
The problem is that when in field txtNum the number is >999 java formats
the value to for example 1 234(mark space between 1 and 2). This cause
the db to throw errors since it's not a number. Could anybody tell me
how to avoid this.
Regards