Getting sql for Callable or Prepared Statements

If I have a PreparedStatement or CallableStatement, and I want to get the sql that was specified when I created the statement from the connection, how do I get it?
[177 byte] By [dmbdmb] at [2007-9-26 1:51:56]
# 1
Easiest way would be to just save a reference to the string at the time you create it.
DrClap at 2007-6-29 3:01:00 > top of Java-index,Core,Core APIs...
# 2
Yeh, in the interim that's what I did. ThanksYou'd think you could get this info from the Statement though, apparently not.
dmbdmb at 2007-6-29 3:01:00 > top of Java-index,Core,Core APIs...