[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]
RE: [KCFusion] MS SQL and query results
You may want to reconsider letting someone know that the account # is right but the password is wrong. -Original Message- From: Keith Purtell [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 11:03 AM To: KCFusion (E-mail) 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]
Re: [KCFusion] MS SQL and query results
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]
[KCFusion] Text box value
Is there a way to show around a value inside a text box? __ 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]
RE: [KCFusion] Text box value
You might be able to use double quotes in your input statement. Try value=#value# -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Laire Josh Sent: Monday, January 28, 2002 1:47 PM To: KCFusion (E-mail) Subject: [KCFusion] Text box value Is there a way to show around a value inside a text box? __ 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]
RE: [KCFusion] Text box value
You could alternate single and double. input type='text' name='blah' value='SomeText' 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. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Laire Josh Sent: Monday, January 28, 2002 1:47 PM To: KCFusion (E-mail) Subject: [KCFusion] Text box value Is there a way to show around a value inside a text box? __ 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]
RE: [KCFusion] Text box value
textarea name=text#Value#/textarea don't forget to strip them in insert :) Or if you want to keep them. Use this tick/quote insert trick cfset locGoodChars = quot;,acute; cfset locBadChars = #chr(34)#,#chr(39)# // use this in your insert statement... '#trim(ReplaceList(form.text, locBadChars, locGoodChars))#' If you do this you wont need them in the textarea Justin Hansen -- Uligh Communications Web Developer / Programmer -- [EMAIL PROTECTED] 913-498-0123 ext 284 -- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Laire Josh Sent: Monday, January 28, 2002 1:47 PM To: KCFusion (E-mail) Subject: [KCFusion] Text box value Is there a way to show around a value inside a text box? __ 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]
Re: [KCFusion] Text box value
Use the htmlEditFormat() function around the value. Value=#htmlEditFormat( someValue )# This will replace the double quotes with quot;, as needed. --Daryl - Original Message - From: Laire Josh [EMAIL PROTECTED] To: KCFusion (E-mail) [EMAIL PROTECTED] Sent: Monday, January 28, 2002 1:47 PM Subject: [KCFusion] Text box value Is there a way to show around a value inside a text box? __ 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]
[KCFusion] How to preserve lt; and gt; strings... (was: Text box value)
Use the htmlEditFormat() function around the value. Value=#htmlEditFormat( someValue )# This will replace the double quotes with quot;, as needed. Speaking of htmlEditFormat, here's a question for you. Say you've got a textarea where users can enter a combination of text and html. A knowledge base system, for the sake of argument. The user decides to enter some displayed code, like this: This is how to bbold/b a word: lt;bgt;boldlt;/bgt; The user saves the record, and so far so good. Now comes time to edit the article, and here's where it gets ugly... MSIE will display the lt; and gt; strings as actual brackets in the text area, so the article now looks like this in the textarea input box: This is how to bbold/b a word: bbold/b and when the user re-saves the article, they of course get switched back to real brackets. Any workarounds would be appreciated... -Ron __ 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]
RE: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value)
Daryl, Well slap my a** and call me Sally. I'm actually doing this with ASP at the moment, and since it doesn't (to my knowledge) have a fn comparable to htmlEditFormat, I didn't actually try it with CF first. My apologies to the group. :) BTW, the ASP fix is like so: Replace(objRS(body),,amp;) when writing the KB article body to the textarea. Even with CF, the htmlEditFormat() fn is a little too several for my purpose, since it also escapes legitimate and marks, and strips carriage returns. -Ron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Daryl Banttari Sent: Monday, January 28, 2002 4:50 PM To: [EMAIL PROTECTED] Subject: Re: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value) If you use htmlEditFormat, then the string gt; will be sent to the browser as amp;gt; So, it should work just fine. Doesn't it? If not, please post the snippet in question. Thanks! --Daryl - Original Message - From: Ron Hornbaker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 28, 2002 3:26 PM Subject: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value) Use the htmlEditFormat() function around the value. Value=#htmlEditFormat( someValue )# This will replace the double quotes with quot;, as needed. Speaking of htmlEditFormat, here's a question for you. Say you've got a textarea where users can enter a combination of text and html. A knowledge base system, for the sake of argument. The user decides to enter some displayed code, like this: This is how to bbold/b a word: lt;bgt;boldlt;/bgt; The user saves the record, and so far so good. Now comes time to edit the article, and here's where it gets ugly... MSIE will display the lt; and gt; strings as actual brackets in the text area, so the article now looks like this in the textarea input box: This is how to bbold/b a word: bbold/b and when the user re-saves the article, they of course get switched back to real brackets. Any workarounds would be appreciated... -Ron __ 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]
RE: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value)
htmlEditFormat() fn is a little too //several// for my purpose, severe sorry, ron __ 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]
Re: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value)
Not to be too picky about things, but (imho) there is no such thing as a 'legitimate' angle bracket in an input's Value attribute. According to the HTML spec, angle brackets, quotes, and ampersands in html tag attibutes 'should be' replaced with their entity references (granted, the angle brackets are replaced mainly to support old/broken implementations): http://www.w3.org/MarkUp/html-spec/html-spec_foot.html#FOOT7 Note that failure to escape ampersands in HREF attributes can sometimes cause unpredictable things to occur in some versions of Netscape-- for example, a href=somepage.cfm?voltage=100amperage=5 will take the amp out of context and change the URL, when clicked, to somepage.cfm?voltage=100erage=5. Which is part of the reason I prefix all form fields and url parameters with ff. Of course, you could make it a point to always use amp; when seperating parameters in HREF attributes, but I personally don't have that kind of patience. (More suggestions on entity references: http://www.w3.org/TR/REC-html40/charset.html#h-5.3.2 --not singled out in that doc is apos;, which escapes the single quote character. For an exhaustive (and exhausting!) list of HTML4 entity references, see: http://www.w3.org/TR/REC-html40/sgml/entities.html ) Also, htmlEditFormat in CF5 no longer eats carriage returns, though it's still documented as doing so. (Shhh!) I guess the rule of thumb (according to Daryl) is to always use htmlEditFormat() when redisplaying user-entered values in HTML form input fields (when using CF5.) --Daryl - Original Message - From: Ron Hornbaker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 28, 2002 5:00 PM Subject: RE: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value) Daryl, Well slap my a** and call me Sally. I'm actually doing this with ASP at the moment, and since it doesn't (to my knowledge) have a fn comparable to htmlEditFormat, I didn't actually try it with CF first. My apologies to the group. :) BTW, the ASP fix is like so: Replace(objRS(body),,amp;) when writing the KB article body to the textarea. Even with CF, the htmlEditFormat() fn is a little too several for my purpose, since it also escapes legitimate and marks, and strips carriage returns. -Ron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Daryl Banttari Sent: Monday, January 28, 2002 4:50 PM To: [EMAIL PROTECTED] Subject: Re: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value) If you use htmlEditFormat, then the string gt; will be sent to the browser as amp;gt; So, it should work just fine. Doesn't it? If not, please post the snippet in question. Thanks! --Daryl - Original Message - From: Ron Hornbaker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 28, 2002 3:26 PM Subject: [KCFusion] How to preserve lt; and gt; strings... (was: Text box value) Use the htmlEditFormat() function around the value. Value=#htmlEditFormat( someValue )# This will replace the double quotes with quot;, as needed. Speaking of htmlEditFormat, here's a question for you. Say you've got a textarea where users can enter a combination of text and html. A knowledge base system, for the sake of argument. The user decides to enter some displayed code, like this: This is how to bbold/b a word: lt;bgt;boldlt;/bgt; The user saves the record, and so far so good. Now comes time to edit the article, and here's where it gets ugly... MSIE will display the lt; and gt; strings as actual brackets in the text area, so the article now looks like this in the textarea input box: This is how to bbold/b a word: bbold/b and when the user re-saves the article, they of course get switched back to real brackets. Any workarounds would be appreciated... -Ron __ 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]