Re: PRO*C Help

From: Alan MCCulloch <amccullo_at_ccu1.auckland.ac.nz>
Date: 2 Feb 1995 03:10:26 GMT
Message-ID: <3gpif2$mg2_at_net.auckland.ac.nz>


Try using strncpy, to ensure that you do not copy more bytes to the varchar than you should. Its possible you are copying past the end of your varchar, and stomping the .len field of another varchar variable, that lives just past the end of the varchar variable you strcpy to, or possibly you are copying a large number of bytes to your varchar, bigger than is valid for a varchar ".len" field. ( Its probably best to strncpy one less byte than the size of your  varchar character array, so that you know for sure that you will  always end up with a null padded string in there.)

Hope this helps Received on Thu Feb 02 1995 - 04:10:26 CET

Original text of this message