Hey Guys me again! Here I'm trying to store the sole result into a string called ans, and use the string in another query. as dar as i can tell the ans string isn't getting any values? Can anybody shed some light on this? Thanks guys.
Does your SQL actually return anything? Have you tried logging what value UName has? Also, in amongst your out.println stuff, you seem to be trying to use the closed ResultSet rs - this might be where your problem is.