Added error codes
If the prepared statement does not exist on server, re-prepare it