I'm not sure if it will work in mysql but for Oracle, to avoid the ' problem
you put '' to get around it. In other words do something like this (modify
as you like for JSP, this is from a bean). So when you are inserting to the
db, pass your string to a method like this to add the ''.
private St
Here is some example code using BigDecimal to give you three decimal places.
float number = 9.9f;
System.out.println("number: " + number);
java.math.BigDecimal number2 = new java.math.BigDecimal(number);
System.out.println("number2: " + number2.toString());
java.math.BigDecimal number3 = number2.
There is POI, which is a collection of Java classes that can be used to
create Excel or Word documents which could then be easily printed.
Check http://jakarta.apache.org/poi for details.
-Original Message-
From: Haseltine, Celeste [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09,
Here is the method I use to do what you are looking for...
private String fixTick( String str ) throws RemoteException {
StringBuffer strOut=new StringBuffer();
for(int intChar=0; intChar < str.length(); intChar++){
if(str.substring(intChar,intChar+1).equals("'"))
You could also use java.util.ArrayList if you are wanting to return an array
from a method and don't know how many items you will get from the method.
Create an arraylist:
ArrayList tcList = new ArrayList();
Add stuff to it:
tcList.add(object_or_variable);
Pass it back, casting it to an array: