Hi..
For ensure, check your SQL directly in database.. (in this case the SQL is correct)..
You could change your code for
while to
if, because the result is only one record, isn't it?..
try to remove this code, because i think it's useless
in that code there's try.. catch.. block, its mean the exception would be caught if happened.., so why we've to throw the exception again (in the catch block)?..
may i know the sequence's method call in your application?..
please correct me if i'm wrong..
Thanks..