Re: Storing HTML in database

2002-10-22 Thread Nicholson, Dale
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

Re: Strange number formatting behavior

2002-10-11 Thread Nicholson, Dale
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.

Re: Report displaying and printing in JSP's

2002-10-10 Thread Nicholson, Dale
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,

Re: replacing a single quote with double quotes

2002-07-16 Thread Nicholson, Dale
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("'"))

Re: Dynamic arrays

2002-02-20 Thread Nicholson, Dale
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: