Assuming the username is unique, simply drop the "and Pword =
'#Trim(form.Pword)#'" and check the password match at the application layer.

--Daryl

----- Original Message -----
From: "Keith Purtell" <[EMAIL PROTECTED]>
To: "KCFusion (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 11:02 AM
Subject: [KCFusion] MS SQL and query results


If I query a MS SQL7 db asking for a record that matches two values, and the
query can't make a match, is there a way to tell which of the values didn't
match? In the query below is there a way to know that the username matched
but the password did not? The only way I can think of to do this is two
different queries. I'm trying to provide more meaningful error messages when
user logins fail.

<CFQUERY name="QueryTest" DATASOURCE="SQL7">
SELECT Username, Pword
FROM TableName
WHERE Username = '#Trim(form.Username)#'
AND Pword = '#Trim(form.Pword)#'
</CFQUERY>

Keith Purtell, Web/Network Administrator
VantageMed Operations (Kansas City)
Email:  [EMAIL PROTECTED]

CONFIDENTIALITY NOTICE: This email message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply email and destroy all copies of the original
message.



______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]



 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 

Reply via email to