There are a numbers of problems with you code.
First _DO_ not build SQL statements like you do. Use SqlParamenter
], but why?
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 ?