There are a numbers of problems with you code.
First _DO_ not build SQL statements like you do. Use
SqlParamenter[
^], but why?
See
http://www.codinghorror.com/blog/2005/04/give-me-parameterized-sql-or-give-me-death.html[
^]
But lets say that you SQL update statement is correct. Then it all depends on you WHERE clause.
Is there a record you table 'joining' that has 'refno' matching the one applied?
Are there any exceptions, what does 'com.ExecuteNonQuery()' returns ?