troubleshooting Question

Removing VB Script control or hidden characters

Avatar of cgcmq
cgcmqFlag for Canada asked on
Microsoft SQL ServerASPVB Script
7 Comments1 Solution742 ViewsLast Modified:
I am working with an existing MS SQL database that stores all the data submitted from a form into a single field:
(text output from the database)

Mr.      
|¬°
Fred      
|¬°
Simpson      
|¬°
President      
|¬°
SARtech Technologies Ltd      
|¬°
39 Pinegrove Crescent      
|¬°

As you can see, the from fields are delimited in the database field using:  |¬°

I wish to retrieve this information from the database and redisplay it.

Data = Split(RS("submissiondata"), "|¬°")

This was leaving some extra characters in the array elements though that could not be removed using trim.  I guessed that there might have been a carriage return in there and so I changed the array to

Data = Split(RS("submissiondata"),"|¬°" &vbcrlf)

This removed 2 of the extra characters but there are still 2 extra characters left.  I tried:
Split(RS("submissiondata"), vbcrlf  &"|¬°" &vbcrlf) and
Split(RS("submissiondata"), "|¬°" &vbcrlf &vbcrlf)

These both returned only a single array element.

Any idea what other characters could be occupying these two spaces.  I verified that there are still two hidden characters by using Len(Data(i)).  I would like to get ride of these hidden character so that I can use a conditional statement such as

If Data(i) = "" then ...

I know that I could always use

If Len(Data(i)) <> 2 then ...

but it bugs me not to be able to sort it out.
ASKER CERTIFIED SOLUTION
Frosty555

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros