The problem is probably that the area you have allocated for the barcode is not sufficient for the amount of data you are trying to supply: Code39 is not a particularly space-efficient barcode, and as you add characters to it, the width of the total barcode continues to grow.
Code-39 Barcode Length Calculator - Traceability[
^]
If the space you have allocated doesn't grow as well, then one of three things will happen:
1) The bar widths have to be reduced. This compromises readability, and can easily lead to completely useless barcodes.
2) The barcode becomes truncated, and not all bars are printed: this renders the barcode either unreadable, or unusable as some info is missing from the read (Code39 does not contain a "built in" checksum byte, so this can't necessarily be easily detected)
3) The barcode infringes the Quiet Zone at one or both ends, and the barcode becomes unreadable.
The only solution that will work in all cases is to increase the size of the area in which you print the barcode.