Inserting variables into a txt file

Results 1 to 2 of 2

Thread: Inserting variables into a txt file

  1. #1
    Justin M Guest

    Default Inserting variables into a txt file

    I need to insert variables of a certain length into a txt file. I am able to insert the variable, but it truncates the right blank spaces. I need these spaces for my text file. For example, if I have a variable that needs to be 30 char's and it is only 10 in length, then the 20 blank spaces are truncated. I need to insert all 30 chars into the txt file. I've put the correct # of chars in SQL. Any help would be appreciated.

  2. #2
    Join Date
    Dec 1969

    Default No...getting fixed length text...

    &#060;%<BR>thirtySpaces = Space(30)<BR>...<BR>thirtyChars = Right( thirtySpaces & theTextData, 30 )<BR>%&#062;<BR><BR>See how it works? You append your text to 30 spaces and then take only the right-most 30 characters of the total resultant text.<BR><BR>The above will RIGHT JUSTIFY your text in the 30 characters.<BR><BR>If you want it LEFT JUSTIFIED:<BR><BR>&#060;%<BR>thirtySpaces = Space(30)<BR>...<BR>thirtyChars = Left( theTextData & thirtySpaces , 30 )<BR>%&#062;<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts