Solved

UNABLE TO COMPARE STRINGS 500POINTS. URGENT.. THANKS.

Posted on 2004-10-05
5
108 Views
Last Modified: 2013-12-24

Hi FP guys, I posted this question in the asp forum, but unfrotunatley they were not able to help since they dislike a lot of things about frontpage, since this is the frontpage forum i figure this is the correct place to post.

here is the link, plesae do post the comments in this forum. thanks.

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21156774.html
0
Comment
Question by:Ricky11
  • 3
5 Comments
 
LVL 14

Accepted Solution

by:
hhammash earned 500 total points
ID: 12236505
Hi,

I think you have to approach the matter in a different way.

1- Create a variable for the value of the Frontpage field
2- Compare "A" to the value of the variable that you have created
3- Try using RTrim instead of Trim
4- Check your data entry,  the space here comes from the data itself.  When you trim it does nothing.  I meant the difference between "OB " and "OB".

Would you please post the code of your dieted FrontPages DRW?

Thanks
hhammash
0
 

Author Comment

by:Ricky11
ID: 12236603
Okay So it is nothing to do with the trimming now, as now both the value of a and the value of b are surely the same but it still will not execute.
<%t = 1 %>
<%a = rtrim(Request.QueryString("firstofsize"))%><br>
A IS, <%=A%><br>
<BR><br>
<%For t = 1 to 6 %>
<% b = RTRIM(FP_FieldVal(fp_rs,"size" & t )) %>
B IS <%=trim(b)%><br>
 <%response.write  (FP_FieldVal(fp_rs,"size" & t )) & "<BR>"
 If rtrim(a) = rtrim(b) Then

     Response.write "*FOUND*"
  Else
    response.write " NOT FOUND "
  End If
Next%>
0
 

Author Comment

by:Ricky11
ID: 12236614
The question is, is it possible to comapre 2 variables when both of the variable contain ' " ' inside the string?

i.e.

A = 72X90"OB
B = 72X90"OB

DOES A = B?
0
 
LVL 12

Expert Comment

by:rcmb
ID: 12236661
A = rtrim(Request.QueryString("firstofsize"))%

B = RTRIM(FP_FieldVal(fp_rs,"size" & t ))

From what I see the code is working because A will never = B because A=something and B=something & t.


try this:

<%t = 1 %>
<%a = Request.QueryString("firstofsize")%><br>
A IS, <%=A%><br>
<BR><br>
<%For t = 1 to 6 %>
<%a = Request.QueryString("firstofsize") & t%><
<% b = fp_rs("size") & t %>
B IS <%=b%><br>
<%
response.write  (FP_FieldVal(fp_rs,"size" & t )) & "<BR>"
 If A = B Then
     Response.write "*FOUND*"
  Else
    response.write " NOT FOUND "
  End If
Next%>

RCMB

0
 

Author Comment

by:Ricky11
ID: 12236729
this is probably the problem with the quotation..

i have posted anotehr question here

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21157828.html
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now