Anand - the previous post corrected your code but didn't tell you why it is correct. I am presuming that tbl_PettyReceipt is some sort of collection. When you put something into a collection, it is casted up to an Object. So, when you pull it out, you have an Object reference, even though the underlying object is actually a String. So, it has to be cast to a String before it can be assigned to the atCode or atAmount variable. Makes sense?