simple error message "problem"
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4989
Printed Date: 30 March 2026 at 3:03pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: simple error message "problem"
Posted By: amisima
Subject: simple error message "problem"
Date Posted: 13 August 2003 at 9:52am
Hi,
I have this update page. The user enters in a record to be updated on a form. The page then displays the record to be updated. I am trying to add a error message to check if what the user typed in doesn't match anything in my database. I have an if statement to do the error checking. It works when the user enters in a record that doesn't match one in my database. The if statement fails when the user enters in a record that matches in the database. The error message "that record doesn't exist!!" appears when the records do match, the matching record appears along with the error message. Here is my if statement. Can anyone help?
if trim(ucase(request.form("frm_title"))) <> trim(ucase(rs.fields("title"))) then
response.write("that record doesn't exist!!")
%><br><%
end if
Thanks,
Amisima
|
Replies:
Posted By: ljamal
Date Posted: 13 August 2003 at 9:57am
Use the strComp function rather than <>, you will get better and more consistent results.
------------- L. Jamal Walton
http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming
|
Posted By: amisima
Date Posted: 13 August 2003 at 11:04am
Hi,
I am not familiar with the strcomp function. Would you be able show me what the syntax would look like. I really appreciate the help.
Amisima
|
Posted By: ljamal
Date Posted: 13 August 2003 at 1:19pm
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctstrcomp.asp - strComp()
------------- L. Jamal Walton
http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming
|
|