Spaces in field data

Results 1 to 2 of 2

Thread: Spaces in field data

  1. #1
    Join Date
    Dec 1969

    Default Spaces in field data

    For some reason I have a program that automatically enters data into an Access database and in one paticular field it enters the data centered in the field. Don&#039;t know why that&#039;s another story in itself. Anyhow, when I access that data in an ASP page I get bogus info because of the SPACES in the beginning of the field. For example the field lenght is 10, but the word DECLINE is only 7 character so the way it&#039;s inputed into the database is with 1 blank space infront. The other problem is if it was ALWAYS only 1 space I could do it, but sometimes the data is something like NO which would then have 4 spaces infront. How can I strip the field until I get to a section that is NOT empty then fill a variable with that information?<BR><BR>Hope that&#039;s not too confusing,<BR>Thanks in advance,<BR>Tom

  2. #2
    Join Date
    Dec 1969

    Default trim

    sVal = trim(sVal) will trim off all leading and ending spaces.

Posting Permissions

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