Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - simple error message
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

simple error message "problem"

 Post Reply Post Reply
Author
amisima View Drop Down
Newbie
Newbie


Joined: 09 June 2003
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote amisima Quote  Post ReplyReply Direct Link To This Post Topic: simple error message "problem"
    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
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 13 August 2003 at 9:57am
Use the strComp function rather than <>, you will get better and more consistent results.
Back to Top
amisima View Drop Down
Newbie
Newbie


Joined: 09 June 2003
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote amisima Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 13 August 2003 at 1:19pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.