DateDiff bug?
I've been looking at how the DateDiff calculations work in CFMX 6.1 and found an odd issue. It appears that DateDiff thinks that 1942 only has 8759 hours and that 1945 has 8761 hours when both should have 8760. This code shows the discrepancy: CFLOOP FROM=1940 TO=1950 INDEX=y CFSET a = createDateTime(y-1,1,1,0,0,0) CFSET b = createDateTime(y ,1,1,0,0,0) CFSET d = dateDiff('h',a,b) BRCFOUTPUT#Year(a)# - #Year(b)# : #d#/CFOUTPUT /CFLOOP This weird hour counts appear in CFMX 6.1 and BlueDragon 6.2 but not in CF5. I'm guessing it may be a java issue? Is this a bug or a feature? :) Chris ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215456 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: DateDiff bug?
I thought it could've been something like that too. I tried Googling it a few different ways but couldn't find anything about it. But if that's the reason, why doesn't CF5 or JavaScript recognize it? It's just one of those things where an odd problem might crop up because of the consistency. Unlikely, I guess, but I'd still rather not have to worry about how dates are being handled... Chris -Original Message- From: Barney Boisvert Sent: Wednesday, August 17, 2005 2:36 PM To: CF-Talk Subject: Re: DateDiff bug? I would imagine that's because the powers that be made some adjustment to time during those two years. Kind of like leap year, but a one-time deal. Since they're paired, it might be a change they made in 1942 (like turning on DST in the spring and not turning off in the fall), and then in 1945 decided that was silly, so they undid it (turned DST back off in the fall). That's just a WAG, but I'd imagine it's something along those lines, rather than a bug. cheers, barneyb On 8/17/05, Lofback, Chris wrote: I've been looking at how the DateDiff calculations work in CFMX 6.1 and found an odd issue. It appears that DateDiff thinks that 1942 only has 8759 hours and that 1945 has 8761 hours when both should have 8760. This code shows the discrepancy: CFLOOP FROM=1940 TO=1950 INDEX=y CFSET a = createDateTime(y-1,1,1,0,0,0) CFSET b = createDateTime(y ,1,1,0,0,0) CFSET d = dateDiff('h',a,b) BRCFOUTPUT#Year(a)# - #Year(b)# : #d#/CFOUTPUT /CFLOOP This weird hour counts appear in CFMX 6.1 and BlueDragon 6.2 but not in CF5. I'm guessing it may be a java issue? Is this a bug or a feature? :) Chris -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215464 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: DateDiff bug?
I tried everything BUT Leap Hour--who'd of thunk? So Java recognizes this, but not JS or CF5. Interesting... Chris -Original Message- From: Barney Boisvert Sent: Wednesday, August 17, 2005 3:17 PM To: CF-Talk Subject: Re: DateDiff bug? Here's an article I just found. Googled '1942 leap hour' and it was the first result: http://www.thesunchronicle.com/articles/2005/08/07/opinion/opi nion5.txt cheers, barneyb On 8/17/05, Lofback, Chris wrote: I thought it could've been something like that too. I tried Googling it a few different ways but couldn't find anything about it. But if that's the reason, why doesn't CF5 or JavaScript recognize it? It's just one of those things where an odd problem might crop up because of the consistency. Unlikely, I guess, but I'd still rather not have to worry about how dates are being handled... Chris -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215468 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Delete CFMAGIC cookie?
All-- Is there anyway to force a client browser to delete a CFMAGIC domain-level cookie? We have users who have domain cookies that are getting each other's sessions and need to remove the cookie. Thanks, Chris ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184290 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Delete CFMAGIC cookie?
We tried that and it didn't work. Here's the background: We were using SETDOMAINCOOKIES in CFAPPLICATION. The CFMAGIC cookie is a domian cookie with no exdate and it appears to be overriding our other host cookies that we want to expire when the browser is closed. CF is bumping all the cookies up into the domain cookie and where they aren't expiring. Is there anyway to override that behavior? Thanks, Chris -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Monday, November 15, 2004 12:43 PM To: CF-Talk Subject: RE: Delete CFMAGIC cookie? Is there anyway to force a client browser to delete a CFMAGIC domain-level cookie? We have users who have domain cookies that are getting each other's sessions and need to remove the cookie. cfif IsDefined(Cookie.CFMAGIC) cfcookie name=CFMAGIC value= expires=NOW /cfif Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184294 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Users getting other user's CFIDs and CFTOKENs
We have discovered that some of our users--not all--are somehow getting another user's CFID/CFTOKEN. Our setup: CF5/Win2K/IIS5, two apps, each in a 2-server cluster, each in the same domain: ie, app1.domain.com and app2.domain.com, storing client variables in a database. We were using CFAPPLICATION with the SETDOMAINCOOKIES=YES but have disabled it. But the domain cookie that was created still exists with the old CFID/CFTOKEN and we can't get rid of it. It appears that users with the domain-level cookie are getting assigned old CFID/CFTOKEN each time they log back in, and if a session with the same CFID/CFTOKEN exists, they are getting the existing users data. We thought we could fix this by deleteing the domain cookie to force a new session but we have been unable to manually expire the domain cookie with CFCOOKIE. Any ideas? We're desperate! Thanks, Chris ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184335 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Verify an email address from a query
AFAIK, an IP address is a valid host in an email address.This RE does not handle that. I also thought that the mailbox name could only contain alphanumerics, hyphens or underscores.But after reading this post and Googling the topic I've found someone who claims that the following are all valid: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 !#$%'*+-./=?^_`{|}~ I've looked over RFC 822 but I frankly can't make heads or tails of it.Can anyone point to an official source that is clear and simple to understand? I want my validation routines to be accurate. Thanks, Chris -Original Message- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 29, 2004 8:37 AM To: CF-Talk Subject: RE: Verify an email address from a query That's news to me. Last I heard it was still 0-9 a-z A-Z . @ _ - But if it is a valid character REFindNocase(^[\+_a-z0-9-]+(\.[\+_a-z0-9-]+)[EMAIL PROTECTED](\.[a-z0-9-]+)*\.(( [a-z]{2,3})|(aero|coop|info|museum|name))$, addr) Or does it have to start with a letter or number first? REFindNocase(^[a-z0-9]+[_a-z0-9-+]+(\.[+_a-z0-9-]+)[EMAIL PROTECTED](\.[a-z0-9-] +)*\.(([a-z]{2,3})|(aero|coop|info|museum|name))$, addr) Do you have some reliable resource you're getting the validity of the characters from? All I am able to find are the characters I mentioned above. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Hal Helms Java For CF Developers class?
Is there anyone on the list that has attended any of Hal Helms' training classes?I am interested in his Java For CF Developers but would like feedback from anyone who has taken it or any of his other classes. Also, the only contact info on his web site is an email address and so far I am unable to get him to respond.My employer (who is paying the tab) is starting to wonder if this training is legitimate because no one gets back to us with our questions.Does anyone know how to reach him?I know he posts here sometimes--are you out there Hal? Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Automated Scripts?
Use the Scheduler in the CF Admin.Write a CF template to handle the logic and schedule it to run each morning. Chris -Original Message- From: Richard Crawford [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 12:39 PM To: CF-Talk Subject: Automated Scripts? I'm trying to figure out how to run some Cold Fusion scripts automatically. For example: our users have logins that expire every three months.I'd like to set up a script which would run each morning to scan all of the users in the database, and send an e-mail to those users whose logins will be expiring in a week. I've looked through the CF Admin page, and haven't found any settings or anything which would set this up. -- Richard S. Crawford Programmer III: Oracle/Solaris Wrangler UC Davis Extension Distance Education Group (http://unexdlc.ucdavis.edu) 2901 K Street, Suite 200C Sacramento, CA95816 (916)327-7793 _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Double Negative way of making decisions? Good?
IIRC, there was a time (thru CF5, I believe) where the use of Compare() was said to be faster because it was a numeric function rather than a string comparison (like IS or EQ).So this was an optimization method.I found it difficult to read too so I stuck with IS and suffered the few millisecond penalty.That penalty may not exist any more in CFMX, though. As for the value of Compare(), CF treats numbers as boolean like this:0 is false, anything else is true.I'm pretty sure that is true across all programming languages. Chris -Original Message- From: Michael Kear [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 6:24 AM To: CF-Talk Subject: Double Negative way of making decisions? Good? I've been taking a look at ContentMonger LiteCMS system, mentioned elsewhere today by Matt Robertson (http://mysecretbase.com/CMLite_Home.cfm), and I notice a lot of the decisions in the code are made by what seems to be a double negative for me.Quite confusing until I got used to it.Is there any performance or other advantage to doing it the way Matt does it, or is it just a matter of style? For example, ContentMonger has this: cfif not Compare(GetItem.SecureDisplay,Y) . Stuff . /cfif Where I'd be more likely to put this: cfif GetItem.SecureDisplay EQ Y . Stuff . /cfif If it's just a matter of style, that's no problem, although I think my way is more readable and more readily understood, but if there is any other reason to do it Matt's way I've got an awful lot of revision of code to do!! Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Double Negative way of making decisions? Good?
But it is treated as boolean.0 is false and anything else is true, including -1 and 3.I use this principle all the time like this: CFIF qryFoo.RecordCount --Output records here-- CFELSE No records found! /CFIF Chris -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 6:31 AM To: CF-Talk Subject: RE: Double Negative way of making decisions? Good? Don't think there is any real performance advantage, its just coder preference... But Matt's way IMHO is incorrect in this instance as Compare can return 3 results and Matt is checking for a Boolean. Compare can return -1,0 or 1 which is not Boolean. _ From: Michael Kear [mailto:[EMAIL PROTECTED] Sent: 19 August 2004 11:24 To: CF-Talk Subject: Double Negative way of making decisions? Good? I've been taking a look at ContentMonger LiteCMS system, mentioned elsewhere today by Matt Robertson (http://mysecretbase.com/CMLite_Home.cfm), and I notice a lot of the decisions in the code are made by what seems to be a double negative for me.Quite confusing until I got used to it.Is there any performance or other advantage to doing it the way Matt does it, or is it just a matter of style? For example, ContentMonger has this: cfif not Compare(GetItem.SecureDisplay,Y) . Stuff . /cfif Where I'd be more likely to put this: cfif GetItem.SecureDisplay EQ Y . Stuff . /cfif If it's just a matter of style, that's no problem, although I think my way is more readable and more readily understood, but if there is any other reason to do it Matt's way I've got an awful lot of revision of code to do!! Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: 3 gmail invites
Yes please! Thanks, Chris -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 1:33 PM To: CF-Talk Subject: OT: 3 gmail invites After a long drought I have 3 gmail invites available.Anyone want one? -- --Matt Robertson-- MSB Designs, Inc. mysecretbase.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: JavaScript Question.
Well, the original code would fail against a value between 0 and 0.01 (like 0.001) so I'd modify it like this: var reg = /([^0-9\.])/g; var str = $0.01; var myValue = parseFloat(str.replace(reg,)) alert(myValue0.01); Also, keep in mind that this will not catch invalid decimal amounts (like 3.1415, etc.)You'd need to get a bit more involved for that.I've written a _javascript_ 1.2 library that does these kinds of validations plus much more including JS versions of dozens of useful CF functions and it's fairly small (~20k).Let me know if you'd like a copy. Chris -Original Message- From: Marlon Moyer [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 7:35 PM To: CF-Talk Subject: RE: _javascript_ Question. put this into a function: var reg = /([^0-9\.])/g; var str = $0.01; var myValue = parseFloat(str.replace(reg,)) alert(myValue0); -Original Message- From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 4:46 PM To: CF-Talk Subject: OT: _javascript_ Question. I have a money field that needs to be greater than $0.01. The field may or may not contain a dollar sign ($) and may or may not contain a period (.) as a dollar/cents split. When the form loads the default value is $0.00 What would be the easiest way to verify the amount is greater than 1 cent (0.01)... Using _javascript_ of course :-) ? Thanks! Mike _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Stupid telephone regex question
Why restrict yourself?Allow ther user to mix-and-match phone formats and then reformat as needed: CFSET Phone = 123.456.7890 CFIF REFind(^([0-9]{3}[-\. ]?|\([0-9]{3}\) ?)[0-9]{3}[-\. ]?[0-9]{4}$,Trim(Phone)) CFSET Temp = REReplace(Phone,[^0-9],,ALL) CFSET Formatted = ( Left(Temp,3) ) Mid(Temp,4,3) - Right(Temp,4) CFOUTPUT#Phone# has been reformatted to #Formatted#/CFOUTPUT CFELSE CFOUTPUT#Phone#/CFOUTPUT is not a valid phone format! /CFIF Chris -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 12:51 PM To: CF-Talk Subject: Stupid telephone regex question I'm trying to use this code and it keeps throwing out the string whether its valid or not.I know I'm doing something wrong but am a dilettante at best when it comes to regexes.I also tried Ben Forta's phone regex out of his book with similarly bad results, so its definitely me doing something stupid here. ThisRegex=[\(.]?[2-9]\d\d[\).]?[ -]?[2-9]\d\d[-.]\d{4}; if (not REFind(ThisRegex, form.myphonefield) { ... What is my coffee-starved Monday morning brainlet missing here? -- --Matt Robertson-- MSB Designs, Inc. mysecretbase.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: increase session time
Check the CF Admin session timeout.It controls the upper limit for session timeouts defined by the CFAPPLICATION tag.You will need to set it higher if you want longer session timeouts.I believe the default is 20 minutes. Chris -Original Message- From: Robert Orlini [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 21, 2004 10:11 AM To: CF-Talk Subject: increase session time I'm getting into the programming of CF OK. I work with sessions but am a bit confused on its setup. In the application.cfm file I have this: CFApplication name=check sessionmanagement=Yes sessiontimeout=#createTimeSpan(0,0,45,0)# It should timeout at 45 minutes but it seems shorter than that. Is adding 60 as opposed to 45 going to get it at 60 minutes. Can I just leave the timeout at 0 or no timeout? Robert O. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: I have a new email address!
Evidently this guy has got an automated response for those using his old email address--like the one he used when subscribing to CF-Talk, maybe?I suspect the list will continue to get this (offensive) message over and over...Can we this address be disabled or blocked? Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 12, 2004 10:00 AM To: CF-Talk Subject: I have a new email address! Hey, You know who this is, ha ha if you emailed me then you must be dumb, because i got a new email address.Dont worry if I dont like you I already blocked your ip from my email list, blocked your address from my email address, but if you get this then I must like you.I got a new address. [EMAIL PROTECTED] Dont forget dat shit because im not telling you again! If you are emailing me for business then email me at my business address [EMAIL PROTECTED]if you email me a personal email to my business email then I will fuckin block your address from both servers stoping your emails permanatly because I dont have time to sort personal from business thats why they are seperated! Remember Business: [EMAIL PROTECTED] Personal: [EMAIL PROTECTED] _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: PL/SQL stumper
This is as close as I can get, it looks like, but it still doesn't work quite right.When I dump the records used by this query and sort them in date order, I have a value that is second in the list that does not make the final top 7.I don't understand why but I'll keep chopping at it. Thanks all, Chris -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 5:38 PM To: CF-Talk Subject: RE: PL/SQL stumper SELECT * FROM ( SELECT d.provider, MAX(m.date_submitted) AS lastDate FROM fsa_detail d, fsa_master m WHERE d.masterid = m.id AND m.ssn = '123-45-6789' GROUP BY d.provider ORDER BY MAX(m.date_submitted) DESC ) WHERE ROWNUM = 7 ORDER BY provider DON'T use rownum in your inner query! -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: woensdag 26 mei 2004 21:13 To: CF-Talk Subject: RE: PL/SQL stumper All right, I guess I'll need to provide actual database info to figure this out.Here's part of Jochem's suggestion, with mods to fit the actual schema (and to fix a grouping error): SELECT d.provider, MAX(m.date_submitted) AS lastDate, rownum AS rn FROM fsa_detail d, fsa_master m WHERE d.masterid = m.id AND m.ssn = '123-45-6789' GROUP BY d.provider, rownum ORDER BY MAX(m.date_submitted) DESC The above query returns this recordset: PROVIDER LASTDATERN Dr. Milton25-MAY-04 15 Dr. Uptagraff25-MAY-04 13 Duncan Health Care25-MAY-04 28 Eckerd Drugs25-MAY-04 27 Hillman's Pharmacy25-MAY-04 22 Home Depot25-MAY-04 10 Publix25-MAY-04 24 Publix Pharmacy25-MAY-04 14 Timmons Drugs25-MAY-04 8 Xylophone Inc25-MAY-04 11 Williams and Assoc.25-MAY-04 17 Wellness Center25-MAY-04 12 Walmart25-MAY-04 26 Walgreens25-MAY-04 25 Walgreen's25-MAY-04 18 Timmons Drugs25-MAY-04 16 Smith's Health Supplies 25-MAY-04 21 Publix25-MAY-04 20 Hush Puppy Shoes25-MAY-04 23 Mease Clinic25-MAY-04 19 Publix Pharmacy24-MAY-04 9 Walmart24-MAY-04 7 Treebeard14-MAY-04 6 Publix14-MAY-04 4 Walmart14-MAY-04 5 Publix14-MAY-04 2 Treebeard14-MAY-04 1 Walmart14-MAY-04 3 What I need is the first 7 (or any arbitrary number) DISTINCT providers from this recordset (ie, the 7 most recent providers) in alpha order.All my solutions so far required grouping, which put the providers in alpha order first and then I pulled the first 7.How can I get the 7 first and THEN sort by alpha? Thanks for your patience and help! Chris _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: PL/SQL stumper
It looks like this is as close as I can get but it still doesn't work quite right.When I dump the records used by this query and sort them in date order, I have a value that is second in the list that does not make the final top 7...I don't understand why but I'll keep chopping at it. Thanks all, Chris -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 5:38 PM To: CF-Talk Subject: RE: PL/SQL stumper SELECT * FROM ( SELECT d.provider, MAX(m.date_submitted) AS lastDate FROM fsa_detail d, fsa_master m WHERE d.masterid = m.id AND m.ssn = '123-45-6789' GROUP BY d.provider ORDER BY MAX(m.date_submitted) DESC ) WHERE ROWNUM = 7 ORDER BY provider DON'T use rownum in your inner query! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: PL/SQL stumper
Yes, the final query gives the first seven of the inner SELECT.It is the inner SELECT that does not appear to be sorting as expected.I don't understand why a record that is second overall when sorted by date does not make it into the first 7 when using MAX() on the date and grouping by provider... Thanks for your help, Chris -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 10:27 AM To: CF-Talk Subject: RE: PL/SQL stumper A tip: run the inner SELECT and dump that (if there aren't too many records). The final query should give you the first 7 of this SELECT. If you have several providers with the same date, they may not come in the same order in the inner select as in the sorted table. -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: donderdag 27 mei 2004 15:51 To: CF-Talk Subject: RE: PL/SQL stumper It looks like this is as close as I can get but it still doesn't work quite right.When I dump the records used by this query and sort them in date order, I have a value that is second in the list that does not make the final top 7... I don't understand why but I'll keep chopping at it. Thanks all, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
PL/SQL stumper
I have a table like the following.With just CFML (v5) and plain Oracle PL/SQL--ie, no temp tables or stored procedures--is there a way to get, say, the 7 most recent distinct providers?I've tried every which way, even using QofQ with MAXROWS=7, but that only returned the first 7 distinct providers alphabetically.I need to get the first 7 distinct providers in date order with newest first.Can it be done without getting fancy? Thanks, Chris PROVIDER DATESTAMP Eckerd Drugs 25-MAY-04 Walmart 25-MAY-04 Walgreens 23-MAY-04 Publix 23-MAY-04 Hush Puppy Shoes 23-MAY-04 Publix 22-MAY-04 Walgreen's 20-MAY-04 Timmons Drugs 20-MAY-04 Publix Pharmacy 19-MAY-04 Walmart 16-MAY-04 Publix Pharmacy 16-MAY-04 Publix 14-MAY-04 Walmart 14-MAY-04 Publix 14-MAY-04 Walmart 14-MAY-04 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: PL/SQL stumper
I thought the same thing at first, but you cannot sort on a field that is not selected when using DISTINCT.And adding the field throws off the records selected because DISTINCT looks at the entire row, not just the one column... Thanks, Chris -Original Message- From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 12:20 PM To: CF-Talk Subject: RE: PL/SQL stumper I have a table like the following.With just CFML (v5) and plain Oracle PL/SQL--ie, no temp tables or stored procedures--is there a way to get, say, the 7 most recent distinct providers?I've tried every which way, even using QofQ with MAXROWS=7, but that only returned the first 7 distinct providers alphabetically.I need to get the first 7 distinct providers in date order with newest first.Can it be done without getting fancy? Thanks, Chris PROVIDER DATESTAMP Eckerd Drugs 25-MAY-04 Walmart 25-MAY-04 Walgreens 23-MAY-04 Publix 23-MAY-04 Hush Puppy Shoes 23-MAY-04 Publix 22-MAY-04 Walgreen's 20-MAY-04 Timmons Drugs 20-MAY-04 Publix Pharmacy 19-MAY-04 Walmart 16-MAY-04 Publix Pharmacy 16-MAY-04 Publix 14-MAY-04 Walmart 14-MAY-04 Publix 14-MAY-04 Walmart 14-MAY-04 Off the top of my head, but does this work?: SELECT provider FROM ( SELECT DISTINCT provider FROM provider_table ORDER BY datestamp DESC ) WHERE rownum = 7 Regards, Dave. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: PL/SQL stumper
This throws an error: ORA-00937: not a single-group group function But it gives me some ideas to work with. Thanks, Chris -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 12:20 PM To: CF-Talk Subject: Re: PL/SQL stumper Lofback, Chris wrote: I need to get the first 7 distinct providers in date order with newest first.Can it be done without getting fancy? PROVIDER DATESTAMP Eckerd Drugs 25-MAY-04 Walmart 25-MAY-04 Walgreens 23-MAY-04 Publix 23-MAY-04 Hush Puppy Shoes 23-MAY-04 Publix 22-MAY-04 Walgreen's 20-MAY-04 Timmons Drugs 20-MAY-04 Publix Pharmacy 19-MAY-04 Walmart 16-MAY-04 Publix Pharmacy 16-MAY-04 Publix 14-MAY-04 Walmart 14-MAY-04 Publix 14-MAY-04 Walmart 14-MAY-04 SELECT * FROM ( SELECT provider, MAX(datestamp) AS lastDate FROM table ORDER BY MAX(datestamp) DESC ) a WHERE rownum 8 Jochem _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: PL/SQL stumper
This doesn't quite do it.The problem is that the recordset from which it gets the first 7 (by rownum) is alphabetical.So the 7 records are the first 7 of the alphabetically sorted group, not the first 7 by date (which could then be sorted alpha using QofQ).I don't know if I'm explaining this clearly--but does that make sense? Thanks again, Chris -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 1:25 PM To: CF-Talk Subject: Re: PL/SQL stumper Lofback, Chris wrote: This throws an error: ORA-00937: not a single-group group function Forgot the GROUP BY: SELECT * FROM ( SELECT provider, MAX(datestamp) AS lastDate FROM table GROUP BY provider ORDER BY MAX(datestamp) DESC ) a WHERE rownum 8 Jochem _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: PL/SQL stumper
Which Oracle version are you using? Oracle8i And I am working on providing a better explanation of the query results.Stay tuned... Thanks, Chris Lofback Web Administrator Ceridian Benefits Services 3201 34th Street S. St. Petersburg, FL 33711 727-395-8881 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: PL/SQL stumper
All right, I guess I'll need to provide actual database info to figure this out.Here's part of Jochem's suggestion, with mods to fit the actual schema (and to fix a grouping error): SELECT d.provider, MAX(m.date_submitted) AS lastDate, rownum AS rn FROM fsa_detail d, fsa_master m WHERE d.masterid = m.id AND m.ssn = '123-45-6789' GROUP BY d.provider, rownum ORDER BY MAX(m.date_submitted) DESC The above query returns this recordset: PROVIDER LASTDATERN Dr. Milton25-MAY-04 15 Dr. Uptagraff25-MAY-04 13 Duncan Health Care25-MAY-04 28 Eckerd Drugs25-MAY-04 27 Hillman's Pharmacy25-MAY-04 22 Home Depot25-MAY-04 10 Publix25-MAY-04 24 Publix Pharmacy25-MAY-04 14 Timmons Drugs25-MAY-04 8 Xylophone Inc25-MAY-04 11 Williams and Assoc.25-MAY-04 17 Wellness Center25-MAY-04 12 Walmart25-MAY-04 26 Walgreens25-MAY-04 25 Walgreen's25-MAY-04 18 Timmons Drugs25-MAY-04 16 Smith's Health Supplies 25-MAY-04 21 Publix25-MAY-04 20 Hush Puppy Shoes25-MAY-04 23 Mease Clinic25-MAY-04 19 Publix Pharmacy24-MAY-04 9 Walmart24-MAY-04 7 Treebeard14-MAY-04 6 Publix14-MAY-04 4 Walmart14-MAY-04 5 Publix14-MAY-04 2 Treebeard14-MAY-04 1 Walmart14-MAY-04 3 What I need is the first 7 (or any arbitrary number) DISTINCT providers from this recordset (ie, the 7 most recent providers) in alpha order.All my solutions so far required grouping, which put the providers in alpha order first and then I pulled the first 7.How can I get the 7 first and THEN sort by alpha? Thanks for your patience and help! Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Don't mean to be picky
A widely adapted methodology. adapted = great typo/pun! Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JavaScript RegEx bug in NS6?
There are only 4 people still using it, so forget it. Yes, it may seem like that, but not according to our logs!We still get thousands of requests from NS6 users each month. Anyway, I'm nit-picky about these things and prefer that my code have as few version issues as possible.My job is to make it easier for customers to do business with us rather than more difficult.I don't like to say Sorry, but we can't write an app that will work for you--please modify YOUR system instead.Yech. Also, it looks like it may be NS6 on WinXP.NS6 on Win98 does not have the issue.So does anyone have a workaround? Thanks again, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
SOT: JavaScript RegEx bug in NS6?
I think I've found a bug in the _javascript_ RegEx implementation in Netscape 6 (for Windows, anyway).Below is a RegEx pattern for a non-IP email address.The first alert shows zero, which is a match beginning with the first character, but the second alert shows '-1', indicating no match.The only difference is using $ for an end-of-line anchor.This code works correctly in NS4(!), NS7 and IE6.Any JS gurus out there have any ideas for a workaround for this? Thanks, Chris SCRIPT LANGUAGE=_javascript_ var s = '[EMAIL PROTECTED]'; alert(s.search(/^['_a-z0-9-]+(\.[_a-z0-9-]+)*@([a-z0-9-]+\.)+([a-z]{2,3}|aero|coop|info|museum|name)/i)); alert(s.search(/^['_a-z0-9-]+(\.[_a-z0-9-]+)*@([a-z0-9-]+\.)+([a-z]{2,3}|aero|coop|info|museum|name)$/i)); /SCRIPT [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JavaScript RegEx bug in NS6?
Thanks for the feedback on Mozilla--good to know.I'd heard that NN6 was buggy but my goal is to support users who have NN6 if at all possible rather than ask them to upgrade. Chris -Original Message- From: Massimo, Tiziana e Federica [mailto:[EMAIL PROTECTED] Sent: Monday, May 17, 2004 2:00 PM To: CF-Talk Subject: Re: _javascript_ RegEx bug in NS6? It works fine on Mozilla 1.6 NN 6 was based on a beta version of Mozilla and was very buggy. You should at least try NN 7 Massimo Foti http://www.massimocorner.com Co-Author of Dreamweaver MX 2004 Magic: http://www.dwmagic.com/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Email Problem
Works great for me--CFMX 6.1 on Win2K/IIS5, Exchange 2K, Outlook 2K. Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Email Problem
I copied the code from Andrew Tyrone's blog and used my own email addresses: cfmail to=[EMAIL PROTECTED] from=[EMAIL PROTECTED] subject=Read receipt test cfmailparam name=Read-Receipt-To value=[EMAIL PROTECTED] cfmailparam name=Disposition-Notification-To value=[EMAIL PROTECTED] This is a test for read receipts.Did it work? /cfmail Chris -Original Message- From: Nathan C. Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 2:10 PM To: CF-Talk Subject: RE: Email Problem Need help, send code. -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 1:06 PM To: CF-Talk Subject: RE: Email Problem Works great for me--CFMX 6.1 on Win2K/IIS5, Exchange 2K, Outlook 2K. Chris _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Email Problem
I didn't see the mailto: tags in the sample on the blog.Are they the problem?I didn't use them and my code worked... Chris -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 2:13 PM To: CF-Talk Subject: RE: Email Problem CFMAIL TO= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] FROM= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] SUBJECT=Need your help SERVER=mail.mindkeeper.net CFMAILPARAM name=Disposition-Notification-To value= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] cfmailparam name=Return-Receipt-To value= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Were you prompted for a return receipt or by chance do you have return receipts automatically generated? /CFMAIL [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Email Problem
Were you prompted for a return receipt or by chance do you have return receipts automatically generated? There was no prompt.We do not get read receipts automatically.We must manually ask for one when sending messages via Outlook. Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Email Problem
Well, I don't know then.Maybe it's an Exchange or Outlook config issue?I'm not a mail admin so I don't know what gotchas to look for.Sorry! Chris -Original Message- From: Ciliotta, Mario [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 2:50 PM To: CF-Talk Subject: RE: Email Problem I tried with and without the mailto tags and I still do not receive the receipts. Mario -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 2:45 PM To: CF-Talk Subject: RE: Email Problem I didn't see the mailto: tags in the sample on the blog.Are they the problem?I didn't use them and my code worked... Chris -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 2:13 PM To: CF-Talk Subject: RE: Email Problem CFMAIL TO= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] FROM= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] SUBJECT=Need your help SERVER=mail.mindkeeper.net CFMAILPARAM name=Disposition-Notification-To value= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] cfmailparam name=Return-Receipt-To value= mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Were you prompted for a return receipt or by chance do you have return receipts automatically generated? /CFMAIL _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Email Problem
Yep, sorry.I should have said the blog Andrew Tyrone mentioned.:) Chris -Original Message- From: Andrew Tyrone [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 3:06 PM To: CF-Talk Subject: RE: Email Problem Chris, That's actually David Medlock's blog; I just found it on Google. Andy -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 2:16 PM To: CF-Talk Subject: RE: Email Problem I copied the code from Andrew Tyrone's blog and used my own email addresses: cfmail to=[EMAIL PROTECTED] from=[EMAIL PROTECTED] subject=Read receipt test cfmailparam name=Read-Receipt-To value=[EMAIL PROTECTED] cfmailparam name=Disposition-Notification-To value=[EMAIL PROTECTED] This is a test for read receipts.Did it work? /cfmail Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
BlueDragon in production?
I am looking at BlueDragon and would like to know who is using it for their production apps.Can you offer a brief evaluation?Stable?Fast?Any incompatibilites other than the unsupported tags mentioned in the docs?We are currently using CF5/Win2K/IIS/Oracle with client variables in a load-balanced environment.We want the equivalent, so I guess we would be looking at BD 3 for now. In short, do you trust BlueDragon for your production apps? Thanks, Chris -Original Message- From: Adrocknaphobia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 9:36 AM To: CF-Talk Subject: Re: CFMX for sale Tim, Sounds to me like you need BlueDragon. -adam -Original Message- From: Claremont, Timothy [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 12:36 PM To: 'CF-Talk' Subject: RE: CFMX for sale I work for a non-profit senior care facility that has been trying to figure out how to come up with the cost of purchasing 6.1. Donating it to us would be a great compromise, wouldn't it??? -Tim [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: BlueDragon in production?
Oops.Forgot to mention we use CF5 Enterprise (for the Oracle Native drivers). Chris -Original Message- From: Lofback, Chris Sent: Wednesday, April 21, 2004 9:52 AM To: '[EMAIL PROTECTED]' Subject: BlueDragon in production? I am looking at BlueDragon and would like to know who is using it for their production apps.Can you offer a brief evaluation?Stable?Fast?Any incompatibilites other than the unsupported tags mentioned in the docs?We are currently using CF5/Win2K/IIS/Oracle with client variables in a load-balanced environment.We want the equivalent, so I guess we would be looking at BD 3 for now. In short, do you trust BlueDragon for your production apps? Thanks, Chris -Original Message- From: Adrocknaphobia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 9:36 AM To: CF-Talk Subject: Re: CFMX for sale Tim, Sounds to me like you need BlueDragon. -adam -Original Message- From: Claremont, Timothy [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 12:36 PM To: 'CF-Talk' Subject: RE: CFMX for sale I work for a non-profit senior care facility that has been trying to figure out how to come up with the cost of purchasing 6.1. Donating it to us would be a great compromise, wouldn't it??? -Tim [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: BlueDragon in production?
We are using CFMX Enterprise for some internal apps and the Oracle drivers work without a hitch. So do you use BlueDragon for any of your production apps?If so, how do you like it? Chris -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 10:09 AM To: CF-Talk Subject: RE: BlueDragon in production? Oops.Forgot to mention we use CF5 Enterprise (for the Oracle Native drivers). One thing you might run into, whether you migrate from CF 5 to BlueDragon or to MX, is that you'll be using JDBC drivers to connect to Oracle, and there are often little differences between how they work and how your current driver works. You'll simply have to test your applications to discover these things. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JS help - checkboxes
Would it make more sense to use radio buttons, which only allow one selection? Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: JS help - checkboxes I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JS help - checkboxes
Glad to help.Here's one more tip.If you want HTML checkboxes and radio buttons to activate by clicking on the label (like other form-based apps), try this snippet of code: LABEL FOR="" TYPE=radio ID=RB1 NAME=Foo VALUE=1Option 1/LABEL I don't think it works on every browser, but it works on most modern ones and the others just ignore the LABEL tags.Note that the FOR parameter of the LABEL tag must match the ID parameter of the radio button or checkbox. Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:46 AM To: CF-Talk Subject: RE: JS help - checkboxes Thanks Chris... was easy and works great Randy... thanks also for your suggestion on the checkbox approach -Original Message----- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:10 AM To: CF-Talk Subject: RE: JS help - checkboxes Would it make more sense to use radio buttons, which only allow one selection? Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: JS help - checkboxes I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Java bootcamp for CF Developers?
I'm looking for a training class that can turn an experienced CF developer (me) into a competent Java developer.Ideally, I'd like something that will include the web development side of Java, like JSP, J2EE, servlets, beans, etc.Can anyone recommend something in the Tampa Bay, FL area?Or within a long drive (or cheap flight) of Tampa? I know there's someone on the list from a company who has a great reputation for their CF training.If you see this, do you also offer Java? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
UTC/TimeZone/Daylight Savings Time problem
We are in the Eastern US Timezone (GMT-5).After the DST adjustment this weekend, some CF5 code that relies on UTC adjustments began failing, showing a one hour difference.We checked our servers (Win2K, Apache 1.3) and the time, date, time zone and DST checkboxes were all correct.We dumped the CF servers UTC settings using GetTimeZoneInfo(), however, and found that the offset was 4 hours instead of 5.We assume it should be 5, like the GMT adjustment.We checked another server that runs Win2K and IIS5 and found the same issue.Any idea what could cause this?Is this perhaps a known bug in CF5?If so, we didn't find anything on MM's site. Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Oracle9, CF5 and Merant drivers
One other thought.Is there any reason why you are not using the Oracle ODBC driver that comes with the Oracle client?We've seen the occasional odd error using the Merant driver and prefer to use the Oracle driver whenever possible. Chris -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 16, 2004 2:28 PM To: CF-Talk Subject: Oracle9, CF5 and Merant drivers I hopefully just finished a marathon with a user trying to use CF5 and Oracle 9.They were having problems we eventually worked out, but I saw this preceding every error message: [MERANT][ODBC Oracle 8 driver] ... error message goes here ... It looks from the above that they're running an Oracle 8 driver on Oracle 9?Its been awhile since I've seen a copy of CF5.Were there separate Oracle 8 and 9 drivers in CF5?Is this the correct, default one to use on o9i? Anyone out there with CF5 that can shed some light? Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc.http://mysecretbase.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Query Result to a comma list
ValueList(query.column) Chris -Original Message- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:21 AM To: CF-Talk Subject: Query Result to a comma list How do you convert a query result column to a comma delimited list without building it with a loop? Thanks Paul Giesenhagen QuillDesign [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: select boxes and javascript
You probably want to use the onChange event for the select list itself, something like this (untested code) : SCRIPT LANGUAGE=_javascript_ function doSwitchDIV(oSelList) { var val = oSelList.options[oSelList.selectedIndex].value; if (val == 'forsale') switchDiv('ez'); if (val == 'forrent') switchDiv('full'); if (val == 'forlease') switchDiv('superduper'); } /SCRIPT cfform name=the_form tr height=12 valign=top td align=leftcfselect name=PropertyDataHouseType class=#SMSformStyle1# option value=forsaleFor Sale/option option value=forrentFor Rent/option option value=forleaseFor Lease/option /cfselect/td td align=leftnbsp;/td td align=leftnbsp;/td /tr /cfform Chris -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 11:10 AM To: CF-Talk Subject: select boxes and _javascript_ Hi guys, I'm trying to work out how to trigger my _javascript_ within a select box: cfform name=the_form tr height=12 valign=top td align=leftcfselect name=PropertyDataHouseType class=#SMSformStyle1# option value=forsale Sale/option option value=forrent Rent/option option value=forlease Lease/option /cfselect/td td align=leftnbsp;/td td align=leftnbsp;/td /tr /cfform I've tried all types like onMouseOut, OnChange, onClick, does anyone know what i should be using?It's setting off a script to show the appropriate DIV. Thanks, Stuart [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: select boxes and javascript
It works for me.But you must actually select a different option or the onChange event will not fire.So if For Sale is selected and you pull down the list and select For Sale again, nothing will happen because nothing changed... Chris -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 11:35 AM To: CF-Talk Subject: RE: select boxes and _javascript_ Thanks for that Chris and Tom, I think i went over my head as i found this script at http://developer.apple.com/internet/webcontent/examples/choose_form_source.html which seemed to work pretty cool. (Example of it working is at http://developer.apple.com/internet/webcontent/examples/choose_form.html). I thought i'd try and change the script so instead of using radio buttons it would use a dropdown box... that's where all my troubles started! :) I tried your code Chris but nothing happened, no errors either. Am I missing something (apart from _javascript_ knowledge!). Stuart -- Original Message -- From: Lofback, Chris [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 2 Mar 2004 11:21:03 -0500 You probably want to use the onChange event for the select list itself, something like this (untested code) : SCRIPT LANGUAGE=_javascript_ function doSwitchDIV(oSelList) { var val = oSelList.options[oSelList.selectedIndex].value; if (val == 'forsale') switchDiv('ez'); if (val == 'forrent') switchDiv('full'); if (val == 'forlease') switchDiv('superduper'); } /SCRIPT cfform name=the_form tr height=12 valign=top td align=leftcfselect name=PropertyDataHouseType class=#SMSformStyle1# option value=forsaleFor Sale/option option value=forrentFor Rent/option option value=forleaseFor Lease/option /cfselect/td td align=left /td td align=left /td /tr /cfform Chris -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 11:10 AM To: CF-Talk Subject: select boxes and _javascript_ Hi guys, I'm trying to work out how to trigger my _javascript_ within a select box: cfform name=the_form tr height=12 valign=top td align=leftcfselect name=PropertyDataHouseType class=#SMSformStyle1# option value=forsale Sale/option option value=forrent Rent/option option value=forlease Lease/option /cfselect/td td align=left /td td align=left /td /tr /cfform I've tried all types like onMouseOut, OnChange, onClick, does anyone know what i should be using?It's setting off a script to show the appropriate DIV. Thanks, Stuart _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Number of files in a directory
In CF5, The FILTER parameter is for a wildcard file extension, like *.cfm, and only a single extension can be used.I don't think this has changed in CFMX. Chris -Original Message- From: Richard Crawford [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 3:50 PM To: CF-Talk Subject: Number of files in a directory If I'm right, then this code snippet.. = cfdirectory directory=#pDir1# action="" name=daList sort=name filter=les* cfset p = #daList.RecordCount# = would return to p the number of files in the directory pDir1 where the filenames start with the characters les. Obviously, though, I'm not right, because p never gets a value other than 0. What am I doing wrong? -- Richard S. Crawford Programmer III, UC Davis Extension Distance Learning Group (http://unexdlc.ucdavis.edu) (916)327-7793 / [EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: SQL question
Query of Query? Chris Lofback Web Administrator Ceridian Benefits Services 3201 34th Street S. St. Petersburg, FL 33711 727-395-8881 -Original Message- From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 2:08 PM To: CF-Talk Subject: SOT: SQL question Ok, I'm back to this. Have an ISP who is using the outdated MySQL 3.23, which does not support Union statements in it's syntax. I need to combine the data of two separate but similar statements so that I may sort on a certain field. These two tables are not Joined by any keys, though it could be perceived that way (the pk of each is auto-numbered so there are many matching values, don't want to eliminate anything in my results). Any ideas? Cutter [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
JRun admin password?
I know I've seen info on recovering CF admin passwords, but does anyone know how to recover a lost JRun 3 admin password on Unix? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CFML/ASP equivalents
Does anyone know of a resource that shows the ASP equivalents for CFML?Like what is the ASP equivalent for CFPARAM?A chart would be great.I've Googled it but haven't found anything. Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFML/ASP equivalents
I've got a cheap ASP book but the index is poor and I'm wasting a lot of time hunting for info.A comparison would be easier/more useful. Also, I didn't think that the Dim statement really replicates the way a CFPARAM tag sets a default value if the variable is undefined.Won't Dim overwrite the variable if it already exists?These are the kinds of things I'd like to know as a CF developer who occasionally needs to work with ASP.Maybe I just need to make a web site ASP for CF Developers... Chris -Original Message- From: Shawn Regan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 11:16 AM To: CF-Talk Subject: RE: CFML/ASP equivalents In asp it would just be setting a declaring a var Eample: Dim myString As String I have not really seen any site or book with the chart you are seeking. Pick up a cheap ASP 3 book. Shawn Regan -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 5:03 AM To: CF-Talk Subject: CFML/ASP equivalents Does anyone know of a resource that shows the ASP equivalents for CFML? Like what is the ASP equivalent for CFPARAM?A chart would be great.I've Googled it but haven't found anything. Thanks, Chris _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFML/ASP equivalents
Me too.I did find bits and pieces here and there but nothing comprehensive.It seems like someone would have this somewhere but I sure couldn't find it.That's why I asked... And what's a wiki anyway? Chris -Original Message- From: Shawn Regan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 12:49 PM To: CF-Talk Subject: RE: CFML/ASP equivalents I'm surprised that there isn't a site out there already. Shawn Regan -Original Message- From: Ryan Kime [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 9:42 AM To: CF-Talk Subject: RE: CFML/ASP equivalents Someone set up a wiki, and we'll get started. -Original Message- From: Brad Roberts [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 11:25 AM To: CF-Talk Subject: RE: CFML/ASP equivalents I've ran into situations where a site like this would be very valuable. It would be great to take it a step further, with PHP comparisons as well. You could deal with each task (CF tag) individually, as well as compare small sample applications that demonstrated how things works together. I could see this helping CF, ASP, PHP developers who are curious about how do do something in one of the other languages. I think the site would be easy to create if it were a community based, where developers could contribute how you might handle tasks in each language. I'm sure best practices would be something to consider as well, since different people will have their own opinions on how to best accomplish a task. Just some thoughts, Brad _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Favorite CF Variable Tricks and Techniques
Well, this may be too common to actually be a trick but I'll give it a shot.Sometimes I want a template/fuse to accept input from a form and other times from a query string.To handle both situations, I set the variable default value like this: CFPARAM NAME=URL.FooBar DEFAULT= CFPARAM NAME=Form.FooBar DEFAULT=#URL.FooBar# And then use Form.FooBar throughout the rest of the template. Chris -Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 12:43 AM To: CF-Talk Subject: Favorite CF Variable Tricks and Techniques I'm doing a presentation for the Boston CFUG Wednesday on Variables in CF (how to use them, scopes, tricks, etc).I've got a lot of material (mostly from the large guide to CF variables I authored here: http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Guides/Varia bles/Index.cfm ) but would like some more interesting code bites. I'm interested mostly in tricks with CF variables (types, scopes, etc) that may not be obvious.For example I'll be covering in some detail how a query column can be used as an array for most array functions and some others. I'll be covering dynamic variable access/assignment using bracketed notation (something I still don't see enough - the evaluate() function just won't seem to die).I'll also be covering a lot of other things but I'd like some more. Any techniques/tricks/observations that anybody would like to share that fit in this vein would be greatly appreciated.I'll gladly give credit in the presentation and, once I finally update it, in the guide to variables as well. Thanks in advance, Jim Davis [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Domain Cookie expiration?
All-- We have a load-balanced CF5 app using client variables on a pair of Win2K/Apache 1.3.x web servers.We need the session to expire when the user closes their browser and are manually resetting the CFID/CFTOKEN session cookies.But when we enable the SETDOMAINCOOKIE option in the CFAPPLICATION tag, the domain cookie seems to be forcing its expiration date onto the session cookies.Is there a way to bypass this behavior or to make the domain cookie expire when the browser closes?Can I rewrite the domain cookie (CFMagic, I think?) in the same way as the session cookies? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Decoding WDDX in ASP?
Can anyone point me at some ASP code that will decode a WDDX packet containg a CF record set into an ADO record set?Basically, from an ASP box I need to retrieve a WDDX packet from a remote CF5 server and extract the query. Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Decoding WDDX in ASP?
Thanks, I looked briefly before asking the list but I'll look it over again a little closer. -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 2:30 PM To: CF-Talk Subject: RE: Decoding WDDX in ASP? Have you tried www.openwddx.org - I believe they had a downloadable set of code that may contain ASP code. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: The Value of CFQUERYPARAM
Another consideration is that you cannot use CF query caching on a query that uses CFQUERYPARAM tags.(At least with CF5 and earlier.) Chris -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:36 PM To: CF-Talk Subject: The Value of CFQUERYPARAM When writing a select statement, if I have a part of a WHERE clause that will be static, always the same value, and this value is not passed in with a variable or constant, is there any inherent value in cfqueryParam ... tags? An Example: WHERE STATUS = cfqueryParam value=M ... or WHERE STATUS = 'M' Is there any real advantage of one of these forms over the other? Just to repeat, these are hard coded, unchanging values NOT passed in with variables or constants.I understand the value of the cfqueryParam tags in conjunction with passing in data with variables, especially data from user forms. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA Confidentiality Notice:This 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 and delete any copies of this message. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Clearing Trusted Cache in CF 5
Does disabling and then reenabling the Trusted Cache option in CF 5 clear the template cache?If not, how can I make CF refresh the entire cache?Does it require a restart? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Clearing Trusted Cache in CF 5
Really?I thought this was a common recommendation for performance tweaking... Chris Lofback Web Administrator Ceridian Benefits Services 3201 34th Street S. St. Petersburg, FL 33711 727-395-8881 -Original Message- From: Doug White [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 9:14 AM To: CF-Talk Subject: Re: Clearing Trusted Cache in CF 5 On a production server with frequent changes, it is best that you turn off trusted cache and leave it off. == Stop spam on your domain, use our gateway! For hosting solutions http://www.clickdoug.com Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1 and PHP == If you are not satisfied with my service, my job isn't done! - Original Message - From: Lofback, Chris [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, November 21, 2003 7:55 AM Subject: Clearing Trusted Cache in CF 5 | Does disabling and then reenabling the Trusted Cache option in CF 5 clear the template cache?If not, how can I make CF refresh the entire cache?Does it require a restart? | | Thanks, | Chris | [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Clearing Trusted Cache in CF 5
Of course.But back to my original question: how can I force a refresh of this cache? Chris -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 11:10 AM To: CF-Talk Subject: RE: Clearing Trusted Cache in CF 5 On a production server with frequent changes, it is best that you turn off trusted cache and leave it off. Or, better yet, don't make frequent changes on a production server. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFCONTENT/CFHEADER woes
I've always used this style: CFHEADER NAME=Content-Disposition VALUE=inline; filename=foo.txt CFCONTENT TYPE=application/unknown FILE=c:\foo.txt Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 1:00 PM To: CF-Talk Subject: CFCONTENT/CFHEADER woes Ok, I was searching the archives for a way to force a file to download (rather then open in the browser) and came up with this code: CFHEADER NAME=content-disposition VALUE=attachment; filename=new.doc CFCONTENT TYPE=application/octet-stream FILE=E:\path\new.doc DELETEFILE=NO This should cause the browser to prompt to download the file rather then try to open it, yes? But I can't seem to get it to work.It just displays the unformatted contents of the document, like this kind of stuff: С± $! Am I doing something wrong here?I should note that I'm using IE 6 (and so are the people who will use the application I'm developing). Thank you! jim [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: randRange(); just how random is it?
That would be Randomize(number). Chris -Original Message- From: Angel Stewart [mailto:[EMAIL PROTECTED] Sent: Saturday, November 08, 2003 6:45 PM To: CF-Talk Subject: RE: randRange(); just how random is it? There should be a way to re-seed the random number generator. -Gel -Original Message- From: Paul Vernon [mailto:[EMAIL PROTECTED] Are you calling randomize a lot??? If you do, your random sequences won't be all that random Paul [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Killing a session Variable
Off the top of my head, wouldn't it be... StructDelete(session,TestVariable, TRUE) Chris -Original Message- From: Nick Baker [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 12:36 PM To: CF-Talk Subject: Killing a session Variable CF 5.0 Actually the goal is to kill a session array, but can't seem to get a simple session variable killed. I run the following code and obtain the below results. cfset session.TestVariable = 3 cfoutput #isdefined(session.TestVariable)#br #StructDelete(session,session.TestVariable, TRUE)# br #session.TestVariable#br #isdefined(session.TestVariable)#br /cfoutput --- Results YES NO 3 YES Any suggestions? Thanks, Nick [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CF5: Oracle recordset via StoredProc and QofQ questions
All-- Two questions for CF5, Win2K and IIS5. 1)Are there any limitations/issues when retrieving large (say 250,000 rows of 10 varchar2(50) columns) recordsets from Oracle 8 using a stored procedure?Is it slow?Unstable/flaky? 2)Can QofQ handle a recordset that large? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF5: Oracle recordset via StoredProc and QofQ questions
So it's really just a question of RAM?No other serious performance concerns for retrieving record sets via SP? Thanks, Chris -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:08 PM To: CF-Talk Subject: Re: CF5: Oracle recordset via StoredProc and QofQ questions Lofback, Chris wrote: 1)Are there any limitations/issues when retrieving large (say 250,000 rows of 10 varchar2(50) columns) recordsets from Oracle 8 using a stored procedure?Is it slow?Unstable/flaky? 250,000 * 10 * 50 = 125 MB minimum It needs to be stored in RAM. 2)Can QofQ handle a recordset that large? If you have the RAM. Remember that with every QoQ you create a new recordset that needs to be stored in RAM. Plus the output page needs to be stored in RAM. I would rethink and try to do more in the DB. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF5: Oracle recordset via StoredProc and QofQ questions
250K rows is our worst-case.We hope the majority are much smaller, say ~10K-20K. And the plan is not to dump the entire recordset to the client, but to build a Next n interface that will allow them to filter/sort the results and then scroll through the records 50 or so at a time.We plan to cache the recordset returned by the SP using QofQ.The main problem is that the SP is slow (and out of my control to change or optimize!) and we need a way to hit it once and then display/filter/sort the records in various ways. We could save ourselves a lot of headaches if there was a way to cache the SP recordset directly, but I don't see a way to do that. Any better ideas are certainly welcome! Thanks, Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 2:36 PM To: CF-Talk Subject: RE: CF5: Oracle recordset via StoredProc and QofQ questions small recordsets perhaps, but the set you described will cause issues.Think about how much time it takes to run the SP and return all data to CF then down to the client.Also, the browser ain't gonna handle 100MB of data very well now, eh?Now, your DB call will take up a thread for a long time, if the user cancels a request this thread stays active.Non patient users will cause havoc here. Doug -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 2:24 PM To: CF-Talk Subject: RE: CF5: Oracle recordset via StoredProc and QofQ questions So it's really just a question of RAM?No other serious performance concerns for retrieving record sets via SP? Thanks, Chris -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:08 PM To: CF-Talk Subject: Re: CF5: Oracle recordset via StoredProc and QofQ questions Lofback, Chris wrote: 1)Are there any limitations/issues when retrieving large (say 250,000 rows of 10 varchar2(50) columns) recordsets from Oracle 8 using a stored procedure?Is it slow?Unstable/flaky? 250,000 * 10 * 50 = 125 MB minimum It needs to be stored in RAM. 2)Can QofQ handle a recordset that large? If you have the RAM. Remember that with every QoQ you create a new recordset that needs to be stored in RAM. Plus the output page needs to be stored in RAM. I would rethink and try to do more in the DB. Jochem _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CFMX 6.1 Tag Updates for CF Studio 4.5?
All-- I'm stuck with CFStudio 4.5.2 and need the tag updates for CFMX 6.1.I tried the download from MACR but it doesn't appear to be correct.For ex, there's no CFFUNCTION in the tags.Does anyone have a link they could share? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Session Variables Or Client Variables (Pros Cons - Poll)
In CF5, client variables are the only option when clustering/load-balancing. -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 4:30 PM To: CF-Talk Subject: Session Variables Or Client Variables (Pros Cons - Poll) Personally i am not a big fan of Client Variables due to DB Serialize/De-Serialize Overhead and not being able to store complex variables etc... Just Curious.. What would be the CF Developer Consensus to using Client Variables Or using Session Variables? Thanks, Joe Eugene _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Date Comparison using JavaScript
Do you mean to compare date strings rather than date objects?I have a JS library I wrote that will do this, but it requires v4 browser or better.Is that OK? Chris -Original Message- From: Dave Sueltenfuss [mailto:[EMAIL PROTECTED] Sent: Monday, September 29, 2003 10:20 AM To: CF-Talk Subject: OT:Date Comparison using _javascript_ Sorry for the Off Topic post, but I am hoping someone on the list will be able to help me out. Does anyone have a script for comparing two dates within _javascript_? I have a date input field, and the date needs to be within two months either way of today. Any help is appreciated. Thanks Dave Sueltenfuss Application Developer Certified ColdFusion MX Developer Arch Wireless Phone: 508-870-6711 Fax: 508-836-2760 Email: [EMAIL PROTECTED] _ [ Todays Threads [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Queries timeout in CFMX 6.1
Platform: CFMX6.1/Win2K/IIS5 All-- Just installed CFMX 6.1 to run alongside an existing CF5 on a standalone server. The install looks OK--no errors, the CF Admin works fine and CFML statements (ie, CFOUTPUT#DateFormat(Now())#/CFOUTPUT) execute properly. But when I try to use CFQUERY, the query just runs and runs and never returns anything. The DSN verifies in CF Admin but even a simple SQL statement fails: CFQUERY NAME=qryData DATASOURCE=MyDSN SELECT * FROM dual /CFQUERY I don't understand why the DSN verifies in the Admin but doesn't work with a simple query. I know I've seen someone discuss DSN issues on the list but I can't find them in the archive. I remember something about refreshing connectors or something. Could that be the issue? The docs that came with MX are thin on this. Thanks, Chris ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: DateDiff question
Here's an excerpt direct from ColdFusion Studio's help pages ;) Thanks. Well, that's what I get for relying on the popup help and the O'Reilly function reference... When datepart is Weekday (w), DateDiff returns the number of weeks between the two dates. If date1 falls on a Monday, DateDiff counts the number of Mondays until date2. It counts date2 but not date1. If interval is Week (ww), however, the DateDiff function returns the number of calendar weeks between the two dates. It counts the number of Sundays between date1 and date2. DateDiff counts date2 if it falls on a Sunday; but it doesn't count date1, even if it does fall on a Sunday. This seems counterintuitive, doesn't it? One would assume weeks between dates would be 7-day units, just like months between dates is handled. Also, another poster says that CFMX has changed the DateDiff calc for 'ww'... Chris ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
DateDiff question
Platform: CF5/Win2K/IIS5 I'm seeing wierd results from DateDiff when using 'ww' (weeks) as the date part. Can anyone explain these results? CFSET d1 = 08/3/2003 CFSET d2 = 08/10/2003 CFOUTPUT P#DateDiff('ww',d1,d2)# !--- Result: 1 --- /CFOUTPUT CFSET d1 = 08/4/2003 CFSET d2 = 08/11/2003 CFOUTPUT P#DateDiff('ww',d1,d2)# !--- Result: 0 --- /CFOUTPUT To me, these should both be 1 week. CFSET d1 = 1/1/2003 CFSET d2 = 1/11/2003 CFOUTPUT P#DateDiff('ww',d1,d2)# !--- Result: 0 --- /CFOUTPUT CFSET d1 = 1/1/2003 CFSET d2 = 1/12/2003 CFOUTPUT P#DateDiff('ww',d1,d2)# !--- Result: 1 --- /CFOUTPUT I don't know *what* this means. I thought maybe it was based on ordinal weeks, but it doesn't seem to be. Is this expected behavior? Thanks, Chris ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
RE: Listing Number of Results
Does the country appear in a field? If so, you could use something like this: CFSET US_Count = ListValueCountNoCase(ValueList(qryMyQuery.CountryField),US) CFSET INDIA_Count = ListValueCountNoCase(ValueList(qryMyQuery.CountryField),INDIA) ...etc... Chris -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 9:57 AM To: CF-Talk Subject: Listing Number of Results Is there a way, without having to write separate queries for each instance, to list the number of records sorted by a specific field? For example, I've got a table of products listed by a number of countries. On one page, I'd like a summary: US 12 products found INDIA 23 products found ITALY 10 products found. There's close to 40 countries in the database. Certainly don't want to put 40 queries on one page just to count the number for each country! What's Best Practice here? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Array Delimiter Problems
As a helpful tip, I prefer to use the non-typable bell character as a list delimiter. I put this in my app_globals.cfm (if using FB) or application.cfm: CFSET DELIM = Chr(7) Then use DELIM in all list functions, like this: CFOUTPUT#ListGetAt(whatsnew[k],2,DELIM)#/CFOUTPUT Using a character that cannot be typed from a standard keyboard will greatly reduce (if not eliminate) the chance of a list delimiter error. It's also easy to maintain, if you ever need to change the delimiter character. Chris -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 12:42 PM To: CF-Talk Subject: RE: Array Delimiter Problems You're not specifying the pipe as the delimiter in your listlast()s. -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: Jillian Carroll [mailto:[EMAIL PROTECTED] : Sent: Thursday, July 24, 2003 12:20 PM : To: CF-Talk : Subject: Array Delimiter Problems : : : Good Morning! : : I've got an array that worked, other than when content contained : a comma (of : course)... and because a comma is a common character that is actually : required in these fields, I wanted to change the delimiter in my : array to a : |. I made the change below, but I'm no longer having any results : returned. : Can anybody help me find out why? : : -- : Jillian : : *** *** *** : : CODE: : : cfquery name=whatsnewlink datasource=cts : SELECT id, : name, : url, : datebox : FROMlink : WHERE link.include = 'yes' AND datebox = #now()# : /cfquery : : cfquery name=whatsnewgs datasource=cts : SELECT id, : title AS name, : url, : datebox : FROMgs : WHERE gs.include = 'yes' AND datebox = #now()# : /cfquery : : cfquery name=whatsnewevents datasource=cts : SELECT id, : title AS name, : url, : datebox : FROMevents : WHERE events.include = 'yes' AND datebox = #now()# : /cfquery : : cfquery name=whatsnewprof datasource=cts : SELECT id, : title AS name, : url, : datebox : FROMprofessional : WHERE professional.include = 'yes' AND datebox = #now()# : /cfquery : : cfquery name=whatsnewresearch datasource=cts : SELECT id, : title AS name, : url, : datebox : FROMresearch : WHERE research.include = 'yes' AND datebox = #now()# : /cfquery : : cfscript : pound = chr(35); // ascii for # character : /cfscript : : cfset whatsnew = arraynew(1) : cfset i=0 : : p : cfloop Query=whatsnewlink : cfset i = i + 1 : cfset whatsnew[i] = #datebox#|#name#|#url#|#id#|link : cfset whatsnew[i] = replace(whatsnew[i], ||, | |, : ALL) : /cfloop : cfloop Query=whatsnewgs : cfset i = i + 1 : cfset whatsnew[i] = #datebox#|#name#|#url#|#id#|gs : cfset whatsnew[i] = replace(whatsnew[i], ||, | |, : ALL) : /cfloop : cfloop Query=whatsnewevents : cfset i = i + 1 : cfset whatsnew[i] = #datebox#|#name#|#url#|#id#|events : cfset whatsnew[i] = replace(whatsnew[i], ||, | |, : ALL) : /cfloop : cfloop Query=whatsnewprof : cfset i = i + 1 : cfset whatsnew[i] = : #datebox#|#name#|#url#|#id#|professional : cfset whatsnew[i] = replace(whatsnew[i], ||, | |, : ALL) : /cfloop : cfloop Query=whatsnewresearch : cfset i = i + 1 : cfset whatsnew[i] = #datebox#|#name#|#url#|#id#|research : : cfset whatsnew[i] = replace(whatsnew[i], ||, | |, : ALL) : /cfloop : : cfset isSuccessful = ArraySort(whatsnew, textnocase, desc) : : : cfoutput : cfloop index=K from=1 to=#i# : cfif ListLast(whatsnew[k]) EQ link : tr : td bgcolor=ddd9ea : class=smtext#ListGetAt(whatsnew[k],2,|)#a : href=http://#ListGetAt(whatsnew[k],3,|)# class=smtext /a/td : /tr : cfelseif ListLast(whatsnew[k]) EQ gs : tr : td bgcolor=ddd9ea : class=smtext#ListGetAt(whatsnew[k],2,|)#a : href=http://www.lung.ca/cts/guidelines.cfm#pound##ListGetAt(whatsn : ew[k],4,| : )# class=smtext /a/td : /tr : cfelseif ListLast(whatsnew[k]) EQ events : tr : td bgcolor=ddd9ea : class=smtext#ListGetAt(whatsnew[k],2,|)#a : href=http://www.lung.ca/cts/events.cfm#pound##ListGetAt(whatsnew[k : ],4,|)# : class=smtext /a/td : /tr : cfelseif
RE: Usability
I think Nielsen's greatest value is in identifying real web user behavior, i.e., how users really interract with a web site/application. It's up to us to decide how to design to accommodate that behavior. And I meant to recommend the info on UseIt.com--specifically the AlertBox columns--not necessarily the design (which is perhaps even more spare than I would use--and I like 'em simple). But I don't think that the quality of Sun's UI invalidates Nielsen's web usability data and analysis. I worked for many years as a public reference librarian, teaching the public to use info technology and the web, and I observed first hand the behaviors he describes. We need to understand how [EMAIL PROTECTED] really uses our apps if we are to be effective UI designers. Nielsen saves us a lot of basic usability research. We ignore these realities at our own risk. Chris If you haven't already, be sure to see Jakob Nielsen's UseIt.com site. He's a former Sun UI engineer who writes specifically about web usability. Great stuff, IMHO. Not to start on bashing Nielsen, but has anyone ever seen a decent UI on any Sun product? I haven't. Sorry, I've been exposed to CDE a lot lately, and it's made me very angry. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Usability
If you haven't already, be sure to see Jakob Nielsen's UseIt.com site. He's a former Sun UI engineer who writes specifically about web usability. Great stuff, IMHO. http://useit.com Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cftransaction quick question
My thinking is that if the single query fails, there wouldn't be any need for a rollback how does that sound? Sounds good to me. AFIK, a query either succeeds or fails--there's no such thing as partial success in a SQL statement. So if the query fails, there's no change in the DB that would need to be rolled back. Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cftransaction quick question
Well, he's asking specifically about CFQUERY... And as for an SP, wouldn't the transaction have to be controlled inside the SP itself? I don't see how a CFTRANSACTION in your template could control the internal working of a SP. Chris -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 9:07 AM To: CF-Talk Subject: RE: cftransaction quick question No true (well at least for Stored Procedures) as what if the SP does 10 other things before the actual failure? i.e. if you are simply doing one update - then no need for a rollback / update etc BUT for an SP you do require at least a commit or rollback. -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:04 To: CF-Talk Subject: RE: cftransaction quick question My thinking is that if the single query fails, there wouldn't be any need for a rollback how does that sound? Sounds good to me. AFIK, a query either succeeds or fails--there's no such thing as partial success in a SQL statement. So if the query fails, there's no change in the DB that would need to be rolled back. Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cftransaction quick question
- No need for cftransaction on a single SQL query True, but I would always use a CFCATCH to trap any errors. - cftansaction is good practice for a single stored procedure call in case the stored procedure is doing multiple SQL queries I don't know if you read my previous post, but I don't think this is true. CFTRANSACTION cannot talk to the code inside a SP. You must write the transaction handling *within* the SP. So if the SP does 10 mods to the database, each mod within the SP must be checked for success/failure and then rolledback/committed by the SP code itself. CFTRANSACTION cannot be used to do this. Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cftransaction quick question
I would test this carefully because I'm not convinced that CFTRANSACTION can be used to control the actions of a SP. I believe it is for CFQUERY only. Can anyone confirm this? Yes, you can return success/failure codes from the SP to CF, but at that point all the SP's queries have executed and committed (or rolledback, if the code to handle the transaction was in the SP code) and I don't see how CFTRANSACTION can alter that. It's important because if someone assumes they can rollback what a SP does, but then can't...KA-BOOM! Chris -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 9:43 AM To: CF-Talk Subject: RE: cftransaction quick question -- No need for cftransaction on a single SQL query True, but to avoid ugly error I would suggest using cftry/cfcatch to catch db errors - cftansaction is good practice for a single stored procedure call in -- case the stored procedure is doing multiple SQL queries cftransaction should ALWAYS be used for db calls / procedures which perform updates/detes or inserts. its simple good practice and avoids errors. -Original Message- From: David Collie (itndac) [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:26 To: CF-Talk Subject: RE: cftransaction quick question Oops, good point Neil... I was initially thinking that it would cfquery rather than cfstoredproc So a little bit like this? - No need for cftransaction on a single SQL query - cftansaction is good practice for a single stored procedure call in case the stored procedure is doing multiple SQL queries DC -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:07 To: CF-Talk Subject: RE: cftransaction quick question No true (well at least for Stored Procedures) as what if the SP does 10 other things before the actual failure? i.e. if you are simply doing one update - then no need for a rollback / update etc BUT for an SP you do require at least a commit or rollback. -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:04 To: CF-Talk Subject: RE: cftransaction quick question My thinking is that if the single query fails, there wouldn't be any need for a rollback how does that sound? Sounds good to me. AFIK, a query either succeeds or fails--there's no such thing as partial success in a SQL statement. So if the query fails, there's no change in the DB that would need to be rolled back. Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a way to test to see if a data source exists?
These are CF 5 solutions. Try the undocumented CFIF CF_IsColdFusionDataSource(MyDSN) or if you prefer a supported option you could try something like this: CFSET DSN = Foo CFSET DSNType = ODBC CFTRY !--- Query should always fail and go to CFCATCH --- CFQUERY NAME=Test DATASOURCE=#DSN# MAXROWS=1 DBTYPE=#DSNType# SELECT Foo FROM Bar /CFQUERY !--- Just in case --- DSN exists CFCATCH TYPE=Any CFIF FindNoCase(Data source not found,CFCATCH.Message) DSN does not exist! CFELSE DSN exists /CFIF /CFCATCH /CFTRY Chris -Original Message- From: Stan Winchester [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 1:55 PM To: CF-Talk Subject: Is there a way to test to see if a data source exists? Is there a way to test to see if a data source exists? I am creating a setup routine where the user will enter the data source name, and I would like to check to see if it exists before using it. Stan Winchester [EMAIL PROTECTED] http://www.aftershockweb.com/ Tel. 503-244-3440 Fax 503-244-3454 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is Flash really THAT good?
Look at Yahoo, eBay, Amazon and Google. I'd guess they are among the most heavily used sites and they rely on standard light/white background, dark/black text, blue underlined links and (for the most part) standard form elements. Minor differences, but they don't stray far from the basics. They know what works. And we can leverage the usability of those sites by mimicking their navigation and design elements. Most users will know how to navigate a site that looks like them. I know this is anathema to all of the web artistes out there, but it's the truth: the big sites really define usability for the rest of us. We ignore it at our peril. The big sites, as you call them, fall within a pretty limited subset of what web applications can do. They're all designed for very broad use, by lots of people using all sorts of browsers, in an environment where there are lots of alternatives if you don't like their sites. It's a mistake to follow their examples too closely, to the point where you're limiting your application inappropriately. Well, I think it's only a mistake if you do NOT want very broad use, by lots of people using all sorts of browsers, in an environment where there are lots of alternatives. IMHO, that describes the entire web. Even if there are no alternatives to a given site (that seems unlikely in this day and age--maybe 5 years ago but not so much now), who would NOT want their site usable by the most people? Are you willing to lose 10% or 5% or even 1% of potential users/customers just to use a cool new widget? Ask a client what percentage of potential customers they are comfortable excluding from the web site you're building for them because you want to use design elements that some users will not understand and who will bail at the first opportunity. It's cold, but it true: users are impatient and demanding. As for me, I want as many people as possible to be able to use my site. I want to make it drop-dead simple for them to view my info or make a purchase. I will do just about ANYTHING to make that happen, including using standard web page widgets and links that they will all recognize and know how to use. I will use nonstandard widgets only where absolutely necessary. Anybody here remember boo.com and their grand assumptions that people will flock to a new design paradigm? FLOP! We must be careful when dealing with the giant pool of [EMAIL PROTECTED]'s who make up our pool of potential users/customers. Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Javascript error catching
In the past, I've sent this info back to a CF template which could then process it in any way needed. Here is the JS code I included with my JS library. Watch out for the big line wrap on the query_string assignment line! ===START=== var errCount = 0; function errHandler(msg,url,line) { if (document.images) { var par_url = parent.location.href; if (par_url == location.href) par_url = 'no parent'; query_string = 'http:\/\/www.yoursite.com/JSErrorReport.cfm?url='+escape(location.href)+'parent='+escape(par_url)+'referrer='+escape(document.referrer)+'browser='+escape(navigator.appName+' '+navigator.appVersion)+'msg='+escape(msg)+'line='+escape(line)+'count='+(++errCount); var reporter = new Image(); reporter.src = query_string; } return true; } window.onerror = errHandler; ===END=== The JSErrorReport.cfm template just captures the URL variables and then you're set--log them, throw them in a DB or email them to an admin. Chris -Original Message- From: Hugo Ahlenius [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 10:06 AM To: CF-Talk Subject: Javascript error catching Hi, I have this idea to improve the quality of a heavy DHTML/Javascript application -- Storing some important variables (browser, OS, screen size) from javascript when window.onerror function is triggered. This could be stored in a db, or just in a log-file. (One could, onerror, trigger a function in a hidden frame that passes these, in a request, to the server). Has anyone done this? Any code that could be re-used perhaps... ? /Hugo - Hugo Ahlenius E-Mail: [EMAIL PROTECTED] Project OfficerPhone:+46 8 230460 UNEP GRID-Arendal Fax: +46 8 230441 Stockholm Office Mobile: +46 733 467111 WWW: http://www.grida.no - ### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is Flash really THAT good?
However, with a thread like this, it makes me think that you are like the others who bitch about flash yet haven't seen any flash movies worth while. Here are a few flash sites that I consider to be worth your viewing. http://www.2advanced.com/flashindex.htm http://www.egomedia.com http://www.estudio.com just about any flash site on http://www.cwd.dk http://www.homestarrunner.com/sbemail.html (had to throw this is for the humor) Just to name a few. Well, call me old school, but I find these sites annoying and difficult to use. It is my firm opinion that the vast majority of web users do not care for this stuff. It is meant to impress developers, techies and managers but it is hopelessly unfriendly to the majority of users who simply want to accomplish a task on a site. They do not want to wait for these gee-whiz animations to load or to figure out which widget does what--they just want to get what they are there for, and making them wait while your site goes into these gyrations is just bad business. Who wants aggravated customers? Customer service always wins over gimmicks. On the web, speed and usability = good customer service, splash pages and non-standard navigation = bad service. This is going to be hotly denounced by those who love the bleeding edge, but plain HTML (black text, white BG, blue links, no fancy DHTML) is almost always the best choice to let the user get what they want fast. Unless your product IS multimedia-based, or you are using Flash (or any other plugin/gizmo) to make your service easier/faster to use or to provide some vital capabilities--like enhanced form validation/processing--I wouldn't use it. For whom do we develop our web apps? The developers or the users? If you are an online business, you'd better think about it! Look at Yahoo and Google. It's no coincidence that they are successful and they both use simple designs. http://www.useit.com/alertbox/ OK, Flame on! :) Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is Flash really THAT good?
Yeah, but this list is made up of developers and techies, not [EMAIL PROTECTED] Yes, developers and techies who talk about using Flash and other technologies in the real world to deliver real apps for real users. The list also includes many professionals who need to understand the needs of users/customers and apply their skills in the real business world. F*( the customer. We're not talking about customers. Yikes! Do you develop business-related web apps? If so, double yikes! Unfortunately, too many people see simple uses for flash, and not the good uses. Again, yikes! Simple vs. good? These are rarely opposites. They are almost always synonymous. The never mind the customer and fancy/complicated = good mindset leads to user-unfriendly designs and--even worse from a business standpoint--lost customers. It's OK among techies, but it's horrible in the business world. the vast majority of web users probably don't even know what flash is. The point is users don't like being aggravated by poor designs, whether it's Flash, HTML, DHTML or some other unnecessary but cool gizmo. Using Flash for its own sake or because you can do things that impress you and other developers does not mean it's appropriate for the vast majority of web users, who usually make up your customer base. When building business apps, a developer must keep their eye on the goal, not what thrills THEM as a developer. But if Flash delivers something that cannot be delivered better (or at all) in another simpler/faster way, then use it. But IMHO, using it like the sites you cited is not good design or business. Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is Flash really THAT good?
As for non-standard navigation, what make flash navigation non-standard in compared to HTML. What is standard navigation anyhow? Standard navigation doesn't exist. It's just a concept. I don't agree. Blue, underlined text is nearly universally understood as a clickable link, and the vast majority of users recognize a standard HTML button widget. These are instantly recognizable and usable. I'd argue that for all practical purposes this is as close to a standard as you can get. Using different link styles, custom buttons and clickable hot spots is nonstandard, and forces the user to learn how to use the app. Make the widgets different enough, and users just won't do it. Unless the site is the only place to get what they want, they will go find another site that is easier to use. And this is especially true of the non-techie [EMAIL PROTECTED]s who makes up a large portion of the user/customer pool. So why put a user through it? They want fast and easy to use. What's wrong with giving them what they want? And a simple way to do that is to stick as closely as possible to design standards. I love the ease of use at Google and am thankful that they don't force me to endure their idea of an experience to get what I want. They use standard navigation links and buttons and my user experience is great. Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is Flash really THAT good?
Blue, underlined text is hardly navigation. That's just a common identifier for a link, which in HTML is an action, not necessarily navigation. A link can do a number of things like execute a javascript function or dhtml. Google, since you mention how standard it is, does not use this for it's core navigation. Web, Images, Groups, Directory, and News (The four categories of google) are represented with blue text in a box. If selected the box is blue, if not it's gray. This is hardly a standard, but none the less is effective because users are familiar with tabular menus. CF_UsabilitySoapBox Well, this is quibbling over minor differences and word definitions. And I know I'm blowing against the wind here, but the simple fact is that users know what to do with blue, underlined text and HTML buttons. Why deviate from something that users know? It only makes it harder for them and increases the likelihood that they won't use your site--unless they have no place else to go. Here is the key phrase in your post: effective because users are familiar That is the heart of the matter. Every site, whether flash or html, navigate completely different. This is pretty much true and it's a negative, not a positive. On the web, different != good usability. All of those sites with different/unique navigation are harder to use than standard blue underlines and HTML widgets because users have to figure them out--and they HATE that. Even if you think, what's the big deal, it only takes a few minutes? They HATE to be forced to learn something new when all they want to do is...whatever...anything but be forced by some web site to endure their different navigation. Look at Yahoo, eBay, Amazon and Google. I'd guess they are among the most heavily used sites and they rely on standard light/white background, dark/black text, blue underlined links and (for the most part) standard form elements. Minor differences, but they don't stray far from the basics. They know what works. And we can leverage the usability of those sites by mimicking their navigation and design elements. Most users will know how to navigate a site that looks like them. I know this is anathema to all of the web artistes out there, but it's the truth: the big sites really define usability for the rest of us. We ignore it at our peril. There is room for individuality, but most of the Flash example that were suggested on the list are shooting themselves in the foot, IMHO. If we, as developers, care whether or not our site is usable by the most people (which means more opportunities for sales/readers/customers/etc) then we must bow to the simple needs of users and not force our techie-oriented user experiences on them. And using Flash like most sites do goes against good usability. /CF_UsabilitySoapBox Man, I need a weekend off! :) Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
ColdFusion and Crystal Reports
I've never used Crystal from CF, so I'm forwarding the following question from a colleague: I want to use cold fusion to call a Crystal Reports template with a WHERE clause and display the report in PDF. If 500 users are requesting, who handles the requests? ColdFusion or do I need to purchase a Crystal Server? Thanks Basically, he wants to know how licensing is handled when calling Crystal from CF. Will Crystal refuse requests when the license is exceeded? If so, does it throw an error that must be trapped in the CF code? Thanks, Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SOT: ASP equivalent to CF server variables?
Well, I'm beating my brains out trying to find this on MSDN, but I'll bet this group knows... I need an ASP equivalent to CF's built-in server variables, like OS, OS Version, HTTP server, etc. How can I get that in ASP classic? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: ASP equivalent to CF server variables?
Thanks! That gets most of what I needed. Is there any way to get the server OS and OS version? Chris -Original Message- From: Scott Wilhelm [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 9:39 AM To: CF-Talk Subject: RE: ASP equivalent to CF server variables? Give this a try. Might be more than you need, but I'm sure it won't hurt :) [EMAIL PROTECTED]VBScript% htmlbodytest % On Error Resume Next Response.Write All Variables : Now() HR dim Header, Footer header = table border=1 align=center width=400 footer = /table Response.Write(cookies header) for each item in Request.Cookies Response.Write(trtd item /tdtd Request.Cookies(item) /td) next Response.Write(footer server vars header) for each item in request.servervariables Response.Write(trtd item /tdtd -- Request.ServerVariables(item) /td/tr) next Response.write(footer session contents header) for each item in session.contents Response.Write(trtd item /tdtd session(item) /td/tr) next Response.write(footer application contents header) for each item in application.contents Response.Write(trtd item /td/tr) next % table border=0 trtdbScript engine : /td td%= scriptengine() %/td td%= scriptenginemajorversion() %:/td td%=scriptengineminorversion() %/td td%= scriptenginebuildversion() %/td/tr/table /body/html -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 9:35 AM To: CF-Talk Subject: SOT: ASP equivalent to CF server variables? Well, I'm beating my brains out trying to find this on MSDN, but I'll bet this group knows... I need an ASP equivalent to CF's built-in server variables, like OS, OS Version, HTTP server, etc. How can I get that in ASP classic? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Setting session variables from javascript
If you mean having JS in the browser read and set session variables directly, you can't, because JS is client-side and CF session variables are server-side. The only thing you can do is pass variables back and forth via page loads (or getting tricky with hidden frame/GIF pipes) and CFOUTPUTing the data into your JS code, but it's not the same thing as JS dynamically reading and setting session variables. Chris -Original Message- From: Boardwine, David L. [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 9:05 AM To: CF-Talk Subject: Setting session variables from javascript Can someone tell me how to set CF session variables from within javascript? TIA DavidB ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Trusted cache?
The docs are pretty thin on the Trusted cache option in CF5 Admin but I found a Tech Note in MM saying it should be anabled on Production Servers. Is this standard practice out there and, other than remembering to refresh when updating templates, are there any gotchas to be aware of? Thanks, Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFLOOP, almost there
Something like this? CFSET CRLF = Chr(13) Chr(10) CFLOOP LIST=#emailtext# DELIMITERS=#CRLF# INDEX=TheLine CFSET EmailItem = ListContains(TheLine,@, ) CFIF EmailItem CFSET EmailAddress = ListGetAt(TheLine, EmailItem , ) !--- Do whatever you want with #EmailAddress# --- /CFIF /CFLOOP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 1:00 PM To: CF-Talk Subject: CFLOOP, almost there Hi, All I need is some code that will strip out the e-mail address. Ingar Bae Swnary [EMAIL PROTECTED] Ral Diaz Argentina [EMAIL PROTECTED] Cris Grass Uk [EMAIL PROTECTED] Thanks. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFLOOP, almost there
Hmm. Aren't those spaces between the names and email address? If they're tabs, try this: CFSET CRLF = Chr(13) Chr(10) CFSET DELIM = Chr(9) CFLOOP LIST=#emailtext# DELIMITERS=#CRLF# INDEX=TheLine CFSET EmailItem = ListContains(TheLine,@,DELIM) CFIF EmailItem CFSET EmailAddress = ListGetAt(TheLine, EmailItem , DELIM) !--- Do whatever you want with the email address --- BRCFOUTPUT#EmailAddress#/CFOUTPUT /CFIF /CFLOOP If they're something else, change the DELIM value to match and see if that works. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 2:27 PM To: CF-Talk Subject: RE: CFLOOP, almost there Great! This is the closest I've come yet. The problem is the number of charactors on each liine isn't the same. so some lines, I get just the e-mail, others I get the last name and the e-mail address. So close! Something like this? CFSET CRLF = Chr(13) Chr(10) CFLOOP LIST=#emailtext# DELIMITERS=#CRLF# INDEX=TheLine CFSET EmailItem = ListContains(TheLine,@, ) CFIF EmailItem CFSET EmailAddress = ListGetAt(TheLine, EmailItem , ) !--- Do whatever you want with #EmailAddress# --- /CFIF /CFLOOP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 1:00 PM To: CF-Talk Subject: CFLOOP, almost there Hi, All I need is some code that will strip out the e-mail address. Ingar Bae Swnary [EMAIL PROTECTED] Ral Diaz Argentina [EMAIL PROTECTED] Cris Grass Uk [EMAIL PROTECTED] Thanks. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
WebDAV exploit?
Anybody had a problem with CF5 after applying the patch that corrects the Microsoft WebDAV buffer overflow vulnerability for Win2K/IIS5? We're looking at patching several CF5 boxes and heard that some folks had problems. Here's the WebDAV link (watch the wrap!): http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/MS03-007.asp Thanks, Chris Lofback ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Getting server uptime in NT/Win2K?
Using CF4.5/5, does anyone know of a way to get NT/Win2K server uptime and status info, kind of like what 'uptime' offers on Unix? I'm building a CF monitoring system and I want to retrieve this info from some CF/Win boxes. Ideally, I need something that does not need to be installed. Is there some COM object that provides this info and, if so, can anyone point me to some sample code? Thanks, Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Client variable performance question
We are converting a session-variable-heavy app to using client variables in a clustered environment using CF5 and a native driver connection to an Oracle DB. To reduce calls to the DB, I was hoping to just make one call to get all the client variables and then copy them into the request scope, but I have hit a snag. I was planning to use this: CFLOOP LIST=#GetClientVariablesList()# INDEX=s CFSET request.client.#s# = Client.#s# /CFLOOP But the app under consideration may have hundreds of client variables, and I think this code will require a round trip to the DB for each iteration of the loop... What is the best way to copy the entire client scope into the request scope? Can I just select the data from CDATA myself and parse it or is there a hidden danger with that? Is there a better way to handle this? Thanks, Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Client variable performance question
Thanks, that's god news! So there is one read from the DB at the start of the http request, whether or not any of the client vars are read by the app? But I assume each write require a roundtrip? Thanks again, Chris Lofback -Original Message- From: Chris Norloff [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 1:00 PM To: CF-Talk Subject: Re: Client variable performance question I don't think that will help. The client vars are all held in one row in the database - CF gets the entire row whether you want one, many or all client vars. CF makes one call to the db for all client vars used in the current http request, holds the client vars in memory until the end of the request, and then writes the client vars to the db. I wouldn't worry about optimizing calls to client vars, just use them. I don't think moving them into the request scope helps anything. Chris Norloff -- Original Message -- From: Lofback, Chris [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] date: Thu, 6 Mar 2003 12:20:57 -0500 We are converting a session-variable-heavy app to using client variables in a clustered environment using CF5 and a native driver connection to an Oracle DB. To reduce calls to the DB, I was hoping to just make one call to get all the client variables and then copy them into the request scope, but I have hit a snag. I was planning to use this: CFLOOP LIST=#GetClientVariablesList()# INDEX=s CFSET request.client.#s# = Client.#s# /CFLOOP But the app under consideration may have hundreds of client variables, and I think this code will require a round trip to the DB for each iteration of the loop... What is the best way to copy the entire client scope into the request scope? Can I just select the data from CDATA myself and parse it or is there a hidden danger with that? Is there a better way to handle this? Thanks, Chris ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Clustered Session Vars
Except in the situations where you have too much data for a client var to handle but most things you should be ok. Is there a size limit when using a DSN for client variables? I couldn't find that in the docs. What is the limit? Chris Lofback Web Administrator Ceridian Benefits Services 3201 34th Street S. St. Petersburg, FL 33711 727-864-3300 x6589 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Checking all form fields
Yes, you can use the form.fieldnames list and loop through it, something like this: CFLOOP LIST=#Form.FieldNames# INDEX=Field BRCFOUTPUTForm.#Field# = #Form[Field]#/CFOUTPUT /CFLOOP Chris Lofback Sr. Web Developer TRX Integration 28051 US 19 N., Ste. C Clearwater, FL 33761 www.trxi.com -Original Message- From: Thane Sherrington [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 8:20 AM To: CF-Talk Subject: Checking all form fields Is there a way in CF5 to check all form fields even if you don't know their names? Some way to loop through the entire form.* scope, perhaps? T ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4