You do not provide much information, so it's just guessing what the problem could be. I noticed that the second parameter is called 'no'. If 'no' is numeric your statement should look like this:
stmt.executeUpdate("insert into smstable values('"+message+"',"+no+")");
Another possibility is that one or more values exceed the fieldsize limit.
If that is not the problem then add the following line in the catch block:
out.println(e.Message);
or look at the innerexception (if available) for more information and update your question with the extra information.