If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How will be the string compare in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-14-04, 03:07
graceson graceson is offline
Registered User
 
Join Date: Mar 2004
Location: India
Posts: 56
How will be the string compare in ASP

Dear Friends,

I want to know,which code has to be used for the string comparison in ASP.

I have a variable where i am storing the value from a data base


ie var1=Rs1("uname")

I have form value in second varaible

var2=Request.form("name")

now I want to check text box value with this var1

So when I am using following code ,its gives error

If var1=var2 then
statement
end if.

How I can do this checking

ThanX

graceson
Reply With Quote
  #2 (permalink)  
Old 08-14-04, 15:51
MrWizard MrWizard is offline
Registered User
 
Join Date: Mar 2003
Location: Atlanta, GA
Posts: 191
What error are you getting?
__________________
Tim
Reply With Quote
  #3 (permalink)  
Old 08-14-04, 17:02
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Do you have a period after the "end if" in your code as you do in your example? As MrWizard said, it would be helpful to know what the error is.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #4 (permalink)  
Old 08-17-04, 10:14
DBA_Rahul DBA_Rahul is offline
Registered User
 
Join Date: May 2004
Location: bangalore
Posts: 270
Try this

If ( strcomp(var1,var2) == 0)
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On