"invalid number", hai la certezza che "tCodice.getText()" ti restituisca un valore numerico ?