PDA

View Full Version : how do I parse in Java?


ynotlim
09-27-2006, 06:41 PM
I have pdf files in folder 30,31,32,33....etc... when I pull up file # 32456, it should direct to folder 32. How do I get the first two numbers of the file name inside the database?

DB=Files
Column Name = file_name

filename = rs.getString("file_name")
filefolder = ???first two numbers in filename ?????

i need that filefolder varible... how do i do it??

thanks in advance..

Tony

ynotlim
09-28-2006, 12:22 AM
nevermind...I figured it out. You gotta use substrings...i.e. "300000".substring(0,2)