Problem uploading to board

I had uploaded one of the code in Arduino Uno .it showed successful,but now I have to re-upload that code as my project is not working..... When I connected my Arduino to the usb port of tha cpu while reuploading an error message occurred saying problem uploading to board.. also tx and Rx led on Arduino was lit continuously.... That may be the sign of my Arduino getting freeze due to a infinte loop .... In what way should I overcome this problem?

How did you upload the code? To upload something, connect the board first then upload. Don't do anything to it while it is uploading. Check your COM-Port under Tools->Port.

Apurvasatam:
In what way should I overcome this problem?

Post the error message.

Sounds like you are flooding the serial output.

When a sketch does a lot of Serial output it can be very hard to upload a new sketch. The uploading program on the PC sends a command to the bootloader and reads a response. The USB input buffer is full of whatever the sketch was sending and that data does not match the expected response. The uploader tries the command a few more times before giving up.

To upload over a sketch that floods the Serial output:

  1. Hold down the reset button on the Arduino.
  2. Unplug the USB cable. This causes the PC to flush the USB receive buffers.
  3. Re-connect the USB cable. (by continuing to hold the reset button we prevent new flooding)
  4. Begin the new sketch upload.
  5. WHEN THE RX LED ON THE ARDUINO BLINKS: release the reset button.

That RX blink is the first upload command being sent to the bootloader. Releasing the Reset button allows the bootloader to be ready for the first retry of that command.