Yes, that would be just fine I would imagine. You don't show the rest of the try block, but be sure to close the statement and connection in a finally{} clause so you don't chew up your database resources.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847