MX 6.1 W2K3 Installation Hangs
Hi All We have a completely fresh, pristine and virgin installation of Windows Server 2003 Standard, and we're trying to install MX 6.1 Pro onto it. Every time we try, it goes right through the installation to point of Installing Web Server Connectors... Then it pops up a cmd.exe window with nothing in it, and hangs. Forever! We've tried leaving it for over an hour, nothing happened. It wouldn't even respond to the Cancel button. So we killed the installer, deleted all CF files and went through the registry deleting anything matching Macromedia When we run it again, the same problem occurs. We've tried telling the installer to use the built-in web server, use only the default IIS web server, configure all IIS websites - same thing happens every time. Anyone else had this issue? Anyone got round it? Or is our shiny new Windows box just a big pile of doodoo? (no OS flamewars please - if it was up to me we'd certainly be using Apache as a webserver, probably on RedHat Enterprise, but it's not my call unfortunately) All help greatly appreciated Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com T: 020 7357 7358 -- smarter simpler social Personal techie blog : http://instantbadger.blogspot.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: MX 6.1 W2K3 Installation Hangs
Thanks for the info - I've forwarded it onto the guy who's actually doing the server work, so fingers crossed It's a standalone installation - we only have the Professional version, hence no J2EE configuration. _ From: Greg Stewart [mailto:[EMAIL PROTECTED] Sent: 07 September 2004 15:28 To: CF-Talk Subject: Re: MX 6.1 W2K3 Installation Hangs Hi Alistair, Anything in the install log? And what kind of an install are you performing? J2EE/standalone? Also maybe this post can help a little: http://www.bpurcell.org/index.cfm?mode=entryentry=949 and there are a fwe comments relating to win2k3 as well.. Cheers G On Tue, 7 Sep 2004 13:39:47 +0100, Alistair Davidson [EMAIL PROTECTED] wrote: Hi All We have a completely fresh, pristine and virgin installation of Windows Server 2003 Standard, and we're trying to install MX 6.1 Pro onto it. Every time we try, it goes right through the installation to point of Installing Web Server Connectors... Then it pops up a cmd.exe window with nothing in it, and hangs. Forever! We've tried leaving it for over an hour, nothing happened. It wouldn't even respond to the Cancel button. So we killed the installer, deleted all CF files and went through the registry deleting anything matching Macromedia When we run it again, the same problem occurs. We've tried telling the installer to use the built-in web server, use only the default IIS web server, configure all IIS websites - same thing happens every time. Anyone else had this issue? Anyone got round it? Or is our shiny new Windows box just a big pile of doodoo? (no OS flamewars please - if it was up to me we'd certainly be using Apache as a webserver, probably on RedHat Enterprise, but it's not my call unfortunately) All help greatly appreciated Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com T: 020 7357 7358 -- smartersimplersocial Personal techie blog : http://instantbadger.blogspot.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: MX 6.1 W2K3 Installation Hangs
You're saying that the install runs the web server configuration utility even if you choose the JRun web server during the installation? I've never seen that happen before. Hey, Dave, come on over to our place! You can watch it happening over and over again! ;D Anyway, Brandon Purcells tip about minimizing the ports which it scans seemed to do the trick, our server admin guy is happy once more. Thanks for your help guys Alistair [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Security gurus out there?
...sorry, I just finished watching Columbo me too! *turns as he reaches the door, and says* Oh, just one more thing... If you're storing lots of sensitive information in a web application, DON'T RUN IT ON ACCESS!!! Access is a desktop database, threads frequently crop up on here with lots of info on why it's really NOT suited to a server environment... Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com T: 020 7357 7358 -- smarter simpler social Personal techie blog : http://instantbadger.blogspot.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Regex Question: All punct except...
One solution I've used before in vaguely similar situations is to replace the / character with a placeholder, do the nice clean reg ex, then put the slashes back: myString = replace( myString, /, PLACEHOLDER, ALL ); myString = REReplace( myString, [[:punct:]], , ALL ); myString = Replace( myString, PLACEHOLDER, / ); but : - it's going to be slower than doing it all in one regex - you have to choose a placeholder that's never going to appear in your input string (I use something like donkeyshiftingpignudger, or other such blather) - it feels like a nasty kludge so I only use it when I have to (i.e. when I just don't have time to get the all-in-one reg ex working) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: wwokey hole was Re: cf tree menu
http://www.i-r-genius.com/rudeplaces.html some people have WAY too much time on their hands ;) _ From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 00:52 To: CF-Talk Subject: Re: wwokey hole was Re: cf tree menu Wookey Hole iscave which is amazing, ifI remember right :) Used to go there as a kid... I mentioned this to a friend and his response was it sounds unsanitary. :) I'm kinda like Han Solo always stroking my own wookie I'm the root of all that's evil yea but you can call me cookie s. isaac dealey954.927.5117 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.sys-con.com/story/?storyid=44477DE=1 http://www.sys-con.com/story/?storyid=45569DE=1 http://www.fusiontap.com _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: weird but consistent behavior
I've heard of similar things happening on queries where you use SELECT * (see http://www.1pixelout.net/index.cfm/blog/entry/cfqueryparam.htm ) Are you using select * ? If so, consider the error a slap on the wrist! ;) Cheers, Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com T: 020 7357 7358 -- smarter simpler social Personal techie blog: instantbadger.blogspot.com George Abraham wrote: CFMX 6.1 on Win 2000. I am running the dev app off a SQL Server 2000. Everytime I make a change in database design on a particular table (say add a column), I keep getting an error on the front-end of the app. The error seems to occur when it encounters a query of that table in combination with two other tables. The error says Variable cannot be converted to requested type and throws out the line where it encountered the error. This line refers to the identity column of this offending table. cfif FormIDAND ep.FormID = cfqueryparam cfsqltype=cf_sql_smallint value=#FormID#/cfif [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: advice on structure and cfcs (petmarket related)
I figured if I could code something nice and clean somewhat along the lines of the petmarket it would be faster loading. Is that not the case? Yes, you can nearly always write something that's architected completely towards your specific app that runs a smidgeon faster than something like FB or Mach-II, but in my experience: - overhead of the FB3 framework is usually of the order of a couple of milliseconds at most. Mach-II tends to be a little more, but usually no more than 10ms or so in production mode. If you set it into production mode and you're still getting overheads of 1s or more, then there's something wrong with your code, or DB, or server setup, or something similar - Sean's example of MM using Mach-II being a case in point. - Squeezing a few extra milliseconds out of a page execution time has to be balanced against the gains in maintainability, extensibility, development/debug times, and learning curve for new team members that you get from using a standard methodology - If your app is poorly thought out, rushed, or sloppily implemented, it'll probably run like a two-legged-dog on mogadon whether you're using FB3, FB4, Mach-II, XFB, Struts, CF-Objects or your own entirely custom architecture. Ditto for its maintainability, extensibility, bug-fixing, etc etc etc. Just my two pennorth. ( If this ends up as yet another my framework is better than your framework flame war, I'm off to the pub! ;) ) Cheers, Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com T: 020 7357 7358 -- smarter simpler social Personal techie blog : http://instantbadger.blogspot.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: advice on structure and cfcs (petmarket related)
I haven't seen the petmarket example, so I can't comment on that particular case, but I can say that - Yes, in general, that's a very bad thing. I'm not going to go into detail about WHY it's a bad thing, because I'll be rabbiting on for hours, but in practical it harms the flexibility, re-usability and maintainability of your code. The idea is to separate your backend from your frontend - or your Model from your Views, in MVC speak. This is achieved by an intermediary layer called the Controller. So your back-end CFCs are all self-contained - they don't know ANYTHING about the front-end display templates that actually define the interface. Fusebox ( www.fusebox.org http://www.fusebox.org/) was an attempt to achieve this degree of separation long before the advent of CFCs, Mach-II ( www.mach-ii.com http://www.mach-ii.com/) is probably the way to go if you want a standard way of doing it that harnesses the power of the CFC model. Hope that helps Al _ From: stylo stylo [mailto:[EMAIL PROTECTED] Sent: 10 August 2004 06:37 To: CF-Talk Subject: advice on structure and cfcs (petmarket related) I'm looking how to best structure an application and build it with cfcs. I'm looking at the petmarket example right now (cfml only, not the flash front end version). What do people feel in general about the way that application is structured? In particular, I'm wondering about the detailview.cfm which is called by the product.cfc detailview function and used to output the page. Isn't that a bad thing? I would have thought you would call from a page template a cfc to return query info on a product and output that. Anything else about this application in particular I should be aware of or wary of duplicating, as maybe there is a better method or better performance to be had another way? _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Calendar data structure
Read up on the iCal / vCal formats - they're attempted / de-facto standards for transfer of calendar data between applications, and they handle repeating events in a fairly straightforward manner. Last year I had to completely re-write a massive international calendar app from scratch, and the iCal / vCal formats were a very helpful starting point _ From: Burns, John D [mailto:[EMAIL PROTECTED] Sent: 09 August 2004 15:05 To: CF-Talk Subject: Calendar data structure I'm looking for some advice on what sort of structure I should use for making a calendar app.My main question is about storing the dates.To accommodate multi-day events, is it better to do a startDate column and an endDate column or is it better to do a single eventDate column and insert multiple events multiple times?I will need to output this data as today's events, this week's events, and a monthly calendar view. Along the same lines, any suggestions for a CFC or custom tag that can organize into a calendar view (or tips for writing my own) would be helpful.Thanks to all in advance. John Burns _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: cleaning up
Hi Simon, If all else fails, you can use the System.gc() function to give the java garbage collector a nudge - it might not work, but it's worth a try. I blogged about this here : http://instantbadger.blogspot.com/2004/06/collecting-your-garbage-in-cfm x.html Hope that helps Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com blocked::http://www.headshift.com/ T: 020 7357 7358 -- smartersimplersocial [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Webservice returning CFC in a different directory
* Have you tried downing your instance and blowing away the contents of both your cfclasses and cfc-skeletons directories. Yup - tried it many times, no luck... [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Hot Button - English pedantry
(Damn!, ended a sentence with a prep.) ...and followed an exclamation mark with a comma ;-) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Webservice returning CFC in a different directory
In desperation, I've now set up an IIS (...ick...) virtual directory pointing to the directory with all my cfcs in, and lumped the interface cfcs in with the back-end cfcs in the same directory, along with my web service Application.cfm. (ugh.makes my skin feel creepy...). It now works.more or less.some of the time. It seems to randomly fail, giving me errors like cannot resolve CFC datatype for components that have not been changed, the good old cannot generate stub objects error, and a whole host of other axis errors that I'm not even going to bother to list - NOTE: if I restart the server, it works at first, for about 10 minutes, then suddenly stops working for no apparent reason. Oh yes, and if I type in the wsdl address, sometimes I get valid wsdl, sometimes I get nothing but a blank browser screen, sometimes I get an axis error, sometimes I get what looks like valid wsdl but when I try my test client to actually invoke the webservice, it tells me that the wsdl cannot be parsed. Sometimes this happens after I add a totally innocuous line into my web service CFC (like a comment! Yes, adding a comment can break it!), sometimes it starts failing without me changing anything. If anyone can come out with a I've done this and it worked first time, and I've never had any problems with it... I'll be eternally grateful if they can walk me through it. Otherwise, I'm giving up - this is way too much of a headache. Thanks for your help guys. Alistair [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Webservice returning CFC in a different directory
Morning all I've been tearing my hair out with this one: I have a complex application with lots of CFCs that we want to web-service. The CFCs are in a directory outside the webroot, with a mapping set up to it : call it /mycomponents/ I have a directory /ws/ under the webroot with it's own Application.cfm, where I've put the webservice interface CFCs If I put a noddy method into a webservice CFC, like: cfcomponent displayname=myWebService cffunction name=sayHello access=remote returntype=string cfargument name=myName type=string required=true / cfreturn Hello #arguments.myName# / /cffunction /cfcomponent Then I can view the wsdl and call the method, with no problems The trouble comes when I want to return one of the CFCs from the main application, under /mycomponents/ cfcomponent displayname=myWebService cffunction name=getPersonByID access=remote returntype=mycomponents.person cfargument name=intPersonID type=numeric required=true / cfscript objPerson = CreateObject( component, mycomponents/person ); objPerson.init(); objReturnPerson = objPerson.getPersonByID( arguments.intPersonID ); /cfscript cfreturn objReturnPerson / /cffunction /cfcomponent I get an Axis fault : coldfusion.xml.rpc.SkeletonClassLoader$UnresolvedCFCDataTypeException : Could not resolve CFC datatype mycomponents.person I've tried many different ways of referring to mycomponents/person.cfc in the returntype, none of them work. There's a macromedia technote describing a similar fault to this, when instantiating components as local variables in webservice CFCs, the workaround is to put a mapping into jrun-web.xml I've tried that, and it doesn't work for me. If I copy the person.cfc into the same directory as the webservice CFC, it works OK, but I don't want to have to put the webservice CFCs in the same directory as the back-end CFCs, for various reasons that I won't bore you with. I've spent about two hours googling looking for a solution, and all I can find is people having the same problem. No-one seems to have found a fix. So has anyone got any ideas that they'd like to share? Thanks, Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com BLOCKED::http://www.headshift.com/ T: 020 7357 7358 -- smartersimplersocial [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Webservice returning CFC in a different directory
Hi Mike, Yes, I have a mapping set up to mycomponents. I can create an instance of the CFC in the web service method, no problem. If I do: cfcomponent displayname=Person Web Service Component cffunction name=viewPerson returntype=string access=remote cfargument name=intItemID type=numeric required=true / cfscript objPerson = CreateObject( component, mycomponents/person ); objPerson.init(); objPerson = objPerson.viewPersonByID( arguments.intItemID ); //return objPerson; /cfscript cfreturn personid #arguments.intItemID# / /cffunction /cfcomponent Then it works fine, no errors, and returns the string. But if I uncomment the return objPerson line and change the returntype to mycomponents.person, or mycomponents/person, or /mycomponents/person, or anything similar, I get the the UnresolvedCFCDatatype exception. - Do you have a CF Mapping setup pointing to mycomponents/ ? Then you can access the component in the ws by calling something like var oFoo = CreateObject(Component, mycompents.mycfc); HTH Mike [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Webservice returning CFC in a different directory
I've tried it - it doesn't work :-) I've tried person, mycomponents.person, mycomponents/person, /mycomponents/person, none of them work _ From: JediHomer [mailto:[EMAIL PROTECTED] Sent: 12 July 2004 12:35 To: CF-Talk Subject: Re: Webservice returning CFC in a different directory I *beleive* although I havnt tested this that the return type would be person and not myCompnents.Person HTH Mike - Original Message - From: Alistair Davidson [EMAIL PROTECTED] Date: Mon, 12 Jul 2004 12:21:57 +0100 Subject: RE: Webservice returning CFC in a different directory To: CF-Talk [EMAIL PROTECTED] But if I uncomment the return objPerson line and change the returntype to mycomponents.person, or mycomponents/person, or /mycomponents/person, or anything similar, I get the the UnresolvedCFCDatatype exception. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Webservice returning CFC in a different directory
Yeah, it looks like the bottom line is that the webservice CFCs HAVE to be in the same directory as any other CFCs they call. Which effectively means that all your back-end CFCs have to be under the webroot. Is it just me, or does that make anyone else feel a little bit uneasy? Seems like a nasty kludge to me - fingers crossed for Blackstone [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Webservice returning CFC in a different directory
Yes, it works if I set the returntype as struct rather than a specific CFC type. The trouble then is that the struct comes out in the WSDL as a Map type, and I've had all sorts of trouble getting the Map type parsed correctly from a client written in anything other than CF - which kind of goes against the whole point of webservices... (sigh) like I said, fingers crossed for blackstone... Thanks for your help anyway though _ From: JediHomer [mailto:[EMAIL PROTECTED] Sent: 12 July 2004 15:59 To: CF-Talk Subject: Re: Webservice returning CFC in a different directory I beleive thats only to do with CFCs that return CFC components... I dont have the code to hand at the moment but im sure one of my sites proxy's, but it just returns a structure to flash rather than an instance of a CFC HTH - Original Message - From: Alistair Davidson [EMAIL PROTECTED] Date: Mon, 12 Jul 2004 15:47:52 +0100 Subject: RE: Webservice returning CFC in a different directory To: CF-Talk [EMAIL PROTECTED] Yeah, it looks like the bottom line is that the webservice CFCs HAVE to be in the same directory as any other CFCs they call. Which effectively means that all your back-end CFCs have to be under the webroot. Is it just me, or does that make anyone else feel a little bit uneasy? _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Webservice returning CFC in a different directory
found this archived thread on CFCDev that might help you get to where you want to be without having to move your CFCs around: http://www.mail-archive.com/[EMAIL PROTECTED]/msg04805.html Thanks Dave, but I've already tried that, and I just can't get it to resolve the component. Maybe it's because I'm on MX 6.1 Professional, rather than Enterprise? I dunno... I'm on the verge of giving up [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Can originating mail server be spoofed?
Very easy to spoof. I wouldn't even bother fiddling with this - a whole load of effort for a whole world of pain! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Apache and CF
... the point being (when taken in context with the rest of this paragraph), so many people complain that IIS is rubbish etc etc etc. but that is 90% because they are rubbish etc. etc. etc. and don't actually do any configuration of their server, IIS and so on. ;o) Personally, when I started out with web development back in the arse-end of the twentieth century, I used to love IIS for just the reason Thomas stated - wow, a GUI? Isn't it pretty? And I can look like I know what I'm doing when I really don't But now, after several years of wrestling with web servers, I'm firmly with the IIS is rubbish crowd, from my own painful personal experience. I've had no end of trouble with IIS over the years, from the constant security holes and exploits making it almost a full-time job just to keep the damn thing reasonably safe, to configuration being dropped and sites disappearing for no apparent reason, to the inability to have any confidence in backups, to the fact that it's totally insecure by default and you have to sit down and work at a vanilla install for several hours before anyone with an ounce of knowledge would dare make it public.. etc etc, you get the idea With Apache, all config is done with text files, which means that it can be easily backed-up, altered and re-applied by an automated release process (e.g. an ANT script) or even by a CF script, or rolled back to a previous version if you've made a mistake - and when it goes wrong (which, in my experience, it virtually never has) you can easily look at it and see EXACTLY what the software itself is seeing, in a human-readable format. After a little practice, it's actually pretty easy to debug. Admittedly, I haven't used IIS for a couple of years, so it may have improved a little... Also, if you develop and test on Apache for Windows, you can very easily deploy a site on a UNIX or Windows platform without having to worry about the web server config side of things. Apache is by far the most commonly-used web server out there ( e.g. http://www.securityspace.com/s_survey/data/200405/index.html http://www.securityspace.com/s_survey/data/200405/index.htmlreckons it has a 70% market share across 14 million servers ) and yet how many security alerts do you hear about worms / viruses / DDOS attacks targeting vulnerabilities in Apache? Now how many for IIS? The prosecution rests, m'lud (or your honour, for you Americans ;P ) Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com blocked::http://www.headshift.com/ T: 020 7357 7358 -- smartersimplersocial [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: The infamous LIST again!
cfset cfList = REReplaceNoCase( cfList, ,[[:space:]]*,,NO VALUE STRING,, ALL ) / That should do the trick _ From: Chunshen (Don) Li [mailto:[EMAIL PROTECTED] Sent: 30 June 2004 15:27 To: CF-Talk Subject: The infamous LIST again! SET LIST VALUE: cfset cfList = a,b,,d cfloop index=e list=#cfList# cfoutput #e# /cfoutput /cfloop Three out of the above FOUR list elements would be displayed. No, my application requires more complexity than the above example.The point is, I need a NO VALUE STRING for the third element even if it's EMPTY instead of conveniently ignoring it.An attempt to convert the list to an Array, cfset cfList = a,b,,d cfset anArray4List = ListToArray(cfList) cfset cnt = 0 for argument sake, use plain 4 items here cfloop index=e from=1 to=4 cfset cnt = cnt + 1 cfoutput #anArray4List[cnt]# /cfoutput /cfloop Failed to achieve what is intended.It seems that the ListToArray function converts the 3 elements to an array. What's your way to circumvent this problem? TIA. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: ANNOUNCE: ColdFusion MX Master Class, July 19th
True, England can't seem to hold onto anything for very long. certainly not a one-goal lead... _ From: Jerry Johnson [mailto:[EMAIL PROTECTED] Sent: 24 June 2004 17:24 To: CF-Talk Subject: RE: ANNOUNCE: ColdFusion MX Master Class, July 19th Nah. The British would have lost this colony just like they lost every other one. It would have taken longer, agreed. Jerry Johnson [EMAIL PROTECTED] 06/24/04 12:12PM Would those be the same cheese-eating surrender-monkeys without whose help you would still be under British rule? ;P (sorry, couldn't resist!) _ From: Greg Luce [mailto:[EMAIL PROTECTED] Sent: 24 June 2004 16:55 To: CF-Talk Subject: RE: ANNOUNCE: ColdFusion MX Master Class, July 19th French restaurant? Let's not support the cheese-eating surrender-monkeys as part of the class. :-) Greg -Original Message- From: Adam Churvis [mailto:[EMAIL PROTECTED] Sent: Thursday, June 24, 2004 11:12 AM To: CF-Talk Subject: ANNOUNCE: ColdFusion MX Master Class, July 19th Join us July 19th for five challenging days of ColdFusion MX training. The ColdFusion MX Master Class is five extended-hour days of intensive advanced training (8:00 AM to 7:00 PM) in the very best ColdFusion engineering techniques, followed by a sumptuous and hard-earned graduation dinner at the finest French restaurant in Atlanta. Classes are limited to only three students per class, and each class is personally taught by Adam and David Churvis (the principal authors of The ColdFusion MX Bible), so these classes are more like personal mentoring than a regular training class.You'll even get after-class support from us to help you resolve challenging issues. Check out the itinerary at http://www.ColdFusionTraining.com.David and I hope to see you in July! :) PS-- If your budget's almost shot or your boss is tightening the ropes, then give me a call at 770-446-8866 and we'll do what we can to accommodate you. Respectfully, Adam Phillip Churvis Member of Team Macromedia Advanced Intensive ColdFusion MX Training: * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 http://www.ColdFusionTraining.com Download CommerceBlocks V2.1 and LoRCAT from http://www.ProductivityEnhancement.com The ColdFusion MX Bible is in bookstores now! _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: cftransaction inside or outside cfloops?
Also, it may help in these situations to think of cftransaction as a kind of DB-based CFLOCK Transactions, depending on the isolation level, may need to lock the db (either on a row or table basis) to stop any other process making a change while the transaction completes. It's worth bearing this in mind if the loop is going to be more than just a few records. I always try and put the cftransaction around the least amount of code possible, for this very reason. _ From: Steve Nelson [mailto:[EMAIL PROTECTED] Sent: 10 June 2004 19:16 To: CF-Talk Subject: cftransaction inside or outside cfloops? Which is better and why? cfloop query=whatever cftransaction cfqueryinsert/cfquery cfqueryinsert/cfquery cfqueryinsert/cfquery /cftransaction /cfloop Vs. cftransaction cfloop query=whatever cfqueryinsert/cfquery cfqueryinsert/cfquery cfqueryinsert/cfquery /cfloop /cftransaction Steve Nelson _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Coldfusion Regex
!--- in Application.cfm --- cfscript function isValid( strInput ){ // NOTE: the hash character must be escaped // to prevent the CF engine thinking it's the start // of a variable name var reRegEx = /(\%27)|(\')|(\-\-)|(\%23)|(##)/ix; if( REFindNoCase( reRegEx, arguments.strInput ) GT 0 ){ return false; } else { return true; } } /cfscript ... !--- in your processing code --- cfif isValid( form.whatever ) !--- do stuff --- cfelse !--- don't do stuff --- /cfif Hope that helps Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com blocked::http://www.headshift.com/ T: 020 7357 7358 -- smartersimplersocial _ From: Ian Vaughan [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 09:58 To: CF-Talk Subject: Coldfusion Regex Can anybody on the list provide any examples of using coldfusion with regex. For example I have the following line of regex that checks for the detection of SQL meta characters, which will help prevent SQL Injection etc /(\%27)|(\')|(\-\-)|(\%23)|(#)/ix I envisage this will be placed in the application .cfm of the site, but how would you integrate it in with coldfusion to check for invalid input via cookies, form input, http entries etc??? Any ideas would be most welcome Thanks Ian _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Coldfusion Regex
!--- in Application.cfm --- cfscript function isValid( strInput ){ // NOTE: the hash character must be escaped // to prevent the CF engine thinking it's the start // of a variable name var reRegEx = /(\%27)|(\')|(\-\-)|(\%23)|(##)/ix; if( REFindNoCase( reRegEx, arguments.strInput ) GT 0 ){ return false; } else { return true; } } /cfscript ... !--- in your processing code --- cfif isValid( form.whatever ) !--- do stuff --- cfelse !--- don't do stuff --- /cfif Hope that helps Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT www.headshift.com T: 020 7357 7358 -- smarter simpler social [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: java.lang.OutOfMemoryError
There's also a sneaky workaround I found involving the inbuilt java.lang.System object. I wrote a blog article about it here (a bit waffly, but you can just skip straight to the code at the bottom!) : http://instantbadger.blogspot.com/2004_06_01_instantbadger_archive.html# 108798595159007922 Hope that helps, Alistair -- HEADSHIFT www.headshift.com blocked::http://www.headshift.com/ T: 020 7357 7358 -- smartersimplersocial _ From: Dick Applebaum [mailto:[EMAIL PROTECTED] Sent: 19 June 2004 00:12 To: CF-Talk Subject: java.lang.OutOfMemoryError I am program-parsing a large XML file -- my iTunes library: 3,9 Meg 85,000 lines 3,500 tracks 20 Playlists 1 Library Playlist containing all the tracks. A big file When I tried doing this with CFMX XML functions, everything was in memory and I got the java.lang.OutOfMemoryError With the help of Joe Rinehart I put together a Java object to read the XML file, line by line. [EMAIL PROTECTED] I parse each line and: 1) Build a structure of structures of track info: TrackID --- Title --- Artist --- File Path 2) Build a Structuer of structures of structures of structures of Playlist info PlayListID ---Name ---Tracks --TrackNumber -TrackID Title Artist File Path as I create each track in the playlist, I populate it with the info fromthe tracks structure. This all goes well and I am left with 2 big structures in memory. For debugging purposes, I decided to cfdump both structures. Strange thing happens: the program completes and displays the track structure (the first cfdump) abouthalf through the playlist structure the display stops and I get: java.lang.OutOfMemoryError I can change the program so that it just does either one cfdump or the other and it runs fine. so, I added a cfflusg between the 2 cfdumps and it runs fine. My questions: What is causing the out of memory error? Is there a memory limit to CF tags such as cfdump, cfhttp, cffile, etc? if so what is it. Can/shouldI change JVM settings to alleviate this? TIA Dick _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: java.lang.OutOfMemoryError
There's also a sneaky workaround I found involving the inbuilt java.lang.System object. I wrote a blog article about it here (a bit waffly, but you can just skip straight to the code at the bottom!) : http://instantbadger.blogspot.com/2004_06_01_instantbadger_archive.html# 108798595159007922 Hope that helps, Alistair -- HEADSHIFT www.headshift.com blocked::http://www.headshift.com/ T: 020 7357 7358 -- smartersimplersocial [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: how to open an attached file in its own application (ms-word, excel etc).. please read
There is no way to do this from a browser (unless you use ActiveX, possibly - I've never tried it) , for very valid security reasons Can you imagine the security risks if it was possible to craft a HTML document that would automatically force-launch a downloaded document in an external application ? No? OK, lemme give you a for instance - I have a word document on my web server In that word document is a VBA macro In that macro is code that sets your IE bookmarks, your homepage, and your Active Desktop to a given url. What if I set that URL to some really nasty hardcore kiddie sado-porn sites? What if I then followed that code with some more code to auto-launch a browser window? What if I then followed that code with some other code to capture the desktop image, and mail it along with a list of your favourites, to fbi.gov, and every other email address I find on your PC? And what if i put some code to auto-download and force-launch that document into one of my web pages? OK, that may be a bit over-convoluted, let's try a simpler example - The way you normally launch a document in a stand-alone application is by executing the application's .exe file with the document title as the first command line parameter. e.g. Start-Run- iexplore.exe http://bcheck.scanit.be/bcheck/sid-9478971b4113f76c5568dc573ea08d34/ What if I ran FORMAT.COM C: /X ? Hope that's a bit clearer Sorry if I'm a bit grouchy today, I'm still hurting after that damn Swiss referee last nightgrrr. ;) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Why don't query variables persist?
Try using cfprocresult name=... rather than cfprocparam I've never used CF with Oracle, but that's how I fixed a similar issue with SQL Server a while ago _ From: Richard Crawford [mailto:[EMAIL PROTECTED] Sent: 22 June 2004 19:13 To: CF-Talk Subject: Why don't query variables persist? I have the following bit of code: cfstoredproc datasource=DLCampus procedure=dlc_sp_verifyLogin debug=yes cfprocparam type=in value=#trim(FORM.sLogin)# cfsqltype=cf_sql_varchar cfprocparam type=in value=#trim(FORM.sPassword)# cfsqltype=cf_sql_varchar cfprocparam type=in value=#CGI.REMOTE_HOST# cfsqltype=cf_sql_varchar cfprocparam type=in value=#cgi.http_user_agent# cfsqltype=cf_sql_varchar cfprocparam type=in value=#screenSize# cfsqltype=cf_sql_varchar cfprocparam type=out variable=studentID cfsqltype=cf_sql_integer cfprocparam type=out variable=success cfsqltype=cf_sql_integer cfprocparam type=out variable=lastLoginDate cfsqltype=cf_sql_date /cfstoredproc ...and later on, I have... h1cfoutput#studentID#/cfoutput/h1 Unfortunately, by the time the second snippet is executed, which is supposed to print out the value of #studentID#, which is determined in the stored procedure, the value has changed to 0.I know it's not 0 earlier on, since other stored procedures which depend on a non-zero value for this variable do not throw exceptions. The worst part about this is that it *used* to work.It seems to have broken when I changed the datasource to point to a different Oracle database.The new database is identical to the old one, as far as I can tell, but... things just don't work, and I can't find any errors in any logs. Any thoughts? -- 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] [Donations and Support]
RE: ANNOUNCE: ColdFusion MX Master Class, July 19th
Would those be the same cheese-eating surrender-monkeys without whose help you would still be under British rule? ;P (sorry, couldn't resist!) _ From: Greg Luce [mailto:[EMAIL PROTECTED] Sent: 24 June 2004 16:55 To: CF-Talk Subject: RE: ANNOUNCE: ColdFusion MX Master Class, July 19th French restaurant? Let's not support the cheese-eating surrender-monkeys as part of the class. :-) Greg -Original Message- From: Adam Churvis [mailto:[EMAIL PROTECTED] Sent: Thursday, June 24, 2004 11:12 AM To: CF-Talk Subject: ANNOUNCE: ColdFusion MX Master Class, July 19th Join us July 19th for five challenging days of ColdFusion MX training. The ColdFusion MX Master Class is five extended-hour days of intensive advanced training (8:00 AM to 7:00 PM) in the very best ColdFusion engineering techniques, followed by a sumptuous and hard-earned graduation dinner at the finest French restaurant in Atlanta. Classes are limited to only three students per class, and each class is personally taught by Adam and David Churvis (the principal authors of The ColdFusion MX Bible), so these classes are more like personal mentoring than a regular training class.You'll even get after-class support from us to help you resolve challenging issues. Check out the itinerary at http://www.ColdFusionTraining.com.David and I hope to see you in July! :) PS-- If your budget's almost shot or your boss is tightening the ropes, then give me a call at 770-446-8866 and we'll do what we can to accommodate you. Respectfully, Adam Phillip Churvis Member of Team Macromedia Advanced Intensive ColdFusion MX Training: * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 http://www.ColdFusionTraining.com Download CommerceBlocks V2.1 and LoRCAT from http://www.ProductivityEnhancement.com The ColdFusion MX Bible is in bookstores now! _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: CFLOCK
Connie Personally I've tended to store my global settings in an application-scoped struct, but duplicate them into request scope for unlocked usage, like this: cfset bSetup = false cflock scope=APPLICATION timeout=10 type=ReadOnly cfif not isDefined( application.settings) cfset bSetup = true /cfif /cflock cfif bSetup EQ true cfscript strSettings = structNew(); strSettings.dsn = (whatever); // etc /cfscript cflock scope=APPLICATION timeout=10 type=Exclusive Application.settings = Duplicate( strSettings ); /cflock /cfif !--- duplicate settings into request scope --- cflock scope=APPLICATION timeout=10 type=ReadOnly cfset request.settings = Duplicate( application.settings ) / /cflock You can then read the settings from request scope without having to worry about locking. Hope that helps Alistair Alistair Davidson Senior Technical Developer Headshift.com Smarter, Simpler, Social [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFLOCK
The advantage is that you only create them when they're needed. OK, so in that trivial example, there's virtually no difference, but you may have to do some more complicated stuff on application startup. For instance, reading, parsing and initializing language files and variables, if your application is internationalized. Or performing complicated queries for dynamic site configuration that might take seconds to run - you'd then want to cache the results in application scope and duplicate them out. I've done both of these, and when setting up the variables takes minutes but duplicating them out takes milliseconds, it's a real no-brainer. _ From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: 28 May 2004 09:30 To: CF-Talk Subject: RE: CFLOCK I don't see the advantage over setting them in the request scope directly. I don't think duplicating the structure will be much faster than creating the structure (unless this takes a lot of db interaction or processing. -Original Message- From: Alistair Davidson [mailto:[EMAIL PROTECTED] Sent: vrijdag 28 mei 2004 10:26 To: CF-Talk Subject: RE: CFLOCK Connie Personally I've tended to store my global settings in an application-scoped struct, but duplicate them into request scope for unlocked usage, like this: _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CSV File Format Specification
Hi Brook, There isn't really a proper standard for CSV files, it's not like a JPEG or MP3 or anything. But, having said that, I've never seen a CSV file with text-qualified fieldnames. And the text qualifier should only be used on text-format fields - unless the ID maps to a DB field that is in a text format, you don't need the quotes around it. Hope that helps, Alistair Alistair Davidson Senior Technical Developer Headshift.com Smarter, Simpler, Social [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Web Services - getting confused!
Hi Alex, Looks fine to me, and it works fine if I copy and paste the code on my server - if you put the wsdl url into your browser, does it return a valid wsdl? Is the myDocTitle function defined in it? Does it work if you change the functions to just return a hard-coded variable, instead of a query? Alistair Davidson Senior Technical Developer Headshift.com Smarter, Simpler, Social [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Mach-II
Just to stick in my two pennorth, this is something of a pet subject of mine. I wrote an recent article on a similar theme at http://www.headshift.com/archives/001379.cfm There's been some good points on this discussion - I guess my take on it would be that if your planning stage doesn't include which methodology is most appropriate IN THIS CASE?, then that's insufficient planning, full stop. (or period, for the Americans ;P ) And your consideration of which methodology is most appropriate must also include - current in-house expertise - learning curve for a new methodology vs. time constraints for project delivery aswell as the likelihood of future enhancements on this project, etc etc e.g. If you have a shop full of hardcore CFObjects coders, there's no point saying let's do this job in Fusebox 4 / Mach II / methodology X if the deadline is tight. I've been using fusebox since 1999, and I think it's great for MOST apps that I've worked on. On the other hand, I've worked on some projects that have been done entirely in fusebox, but STILL been a nightmare because of insufficient planning. In my experience, the more complicated the application, the more disciplined you should be about sticking to your chosen methodology, whatever it is. I'm sure we've all had some rush jobs that we've thought ah, never mind the full architecture process (or whatever), I'll just hack this together quickly Pretty much every single one of those quick hacks has later turned round and bitten me in the arse to some extent. Have I used Mach II ? Yes Will I use it in future ? Yes, certainly, but with a couple of reservations. Like any new way of doing things, it'll take some time to evolve and mature. Fusebox 1 and 2 were fine for their time, but people (myself include) quickly came up against the limitations of it for more complex projects. Several sites would have been much easier if XFB had been around at the time they were written. Likewise, a couple of big XFB sites I did would have turned out much more elegant if FB3 have been around. I can see similar situations with Mach-II now, and I'm sure when the NEXT version of Mach-II arrives, we'll say the same about apps written in Mach-II version 1. You live and learn. Rant over ;) Alistair Alistair Davidson Senior Technical Developer Headshift.com Smarter, Simpler, Social [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Javascript validation
if( isNaN( inputStr.parseFloat() ) ){ // it's Not a Number } else { // it's OK } Alistair Davidson Senior Technical Developer Headshift.com Smarter, Simpler, Social [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: self varible..
form action=""> method=post Seems to work, but is there a better or more correct way? Yes That will only work if your file is in the root directory of your website. Try this instead - form action="" method=post Cheers, Alistair Davidson Senior Technical Developer Headshift.com Smarter, Simpler, Social [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: sql question
Or how about doing it as an inner join - generally more efficient Select TP.acctNo, TP.trxAmt AS posAmt, TP.trxID AS posTrxID, TN.trxID AS negTrxID, TN.trxAmt AS negAmt, FROM transactions TP INNER JOIN transactions TN ON TP.trxType = TN.trxType AND TP.acctNo = TN.acctNo WHERE TP.trxAmt = 0 - TN.trxAmt It's also generally considered better coding practice to use JOIN statements where you can, as it lets you separate the join conditions from the selection criteria. This helps make the query more readable, and unltimately more maintainable. Just my two-penn'orth ;) Alistair Davidson Application Developer Freeserve.com PLC -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED] Sent: 28 August 2003 06:19 To: CF-Talk Subject: RE: sql question How about this?? Even if it does work, there could be a case where two reversals have the same dollar amount. This could cause confusion. Select * FROM transactions AS transactionsP, transactions AS transactionsN WHERE transactionsP.acctNo = transactionsN.acctNo AND transactionsP.trxType in ('d','r') AND transactionsP.trxType = transactionsN.trxType AND transactionsP.trxAmt 0 AND transactionsP.trxAmt = -transactionsN.trxAmt -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Thursday, 28 August 2003 3:54 p.m. To: CF-Talk Subject: sql question testy this one is i tell ya, testy... ok. i have a table, with 4 columns: 1. acctNo 2. trxAmt 3. trxType 4. trxId where trxType might be [d] or [r] and for every [r] there is a matching [d]. i want to get acctNo's that match but only when the trxAmt are opposing value matches... could be... acctNo: 100 trxAmt: -545.00 trxType: r trxId: 500 and the matching one would look like acctNo: 100 trxAmt: 545.00 trxType: r trxId: 510 basically a reversal of a mistaken transaction now, the problem lies in the fact that there may be another transaction that matches the acctNo but has nothing to do with this payment reversal. can this be done? here is what i have, and its giving me ones that match the acctNo, but are extra, since they are not matching in the dollar value... select acctNo, trxAmt from transactions where (trxtype = 'd' or trxType = 'r') and acctNo in (select acctNo from colthist where trxAmt like '%-%') group by trxAmt, acctNo here is a sample set, the first one that pulls up, and clearly illustrates the problemo ;) 127-154.50 #1 127154.50 #2 127618.00 #3 133-245.00 #4 133-196.00 #5 133-98.00 #6 13325.00 #7 13350.00 #8 13385.11 #9 13398.00 #10 133196.00 #11 133245.00 #12 133500.00 #13 where 1 and 2 are correct but three isnt, and 4,5,6 match 10,11 and 12. but, i dont want 3,7,8,9 or 13 to be there. confused, i hope not, but i hope this is possible in a query... tony tony weeg [EMAIL PROTECTED] www.revolutionwebdesign.com rEvOlUtIoN wEb DeSiGn 410.334.6331 ~| 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: Push and CFFILE Question
Les Write the file and then deliver it using CFCONTENT HTH Alistair -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED]] Sent: 09 October 2002 16:01 To: CF-Talk Subject: Push and CFFILE Question Haven't done this before, looking for some pointers... A. Page has a button on it to Create File from a database query (got no problem with this part) B. When pressed, the file is created and pushed at the user, whom would immediately get a prompt to Save or Open the file. Possible? The client wants one simple step to do this and would prefer to *not* have to browse/select the file after creation or click anything to download. (Lazy, I know.) Thanks, Les * Happily using CFMX with little or no problems... * ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk 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.
RE: Can anybody see a problem with this?
Hi Bill Off the top of my head I can't think of a reason why that wouldn't work, but to my mind, relying on the server's error catching to perform designed functionality just feels wrong - it feels like bad design, and it's shifting some of your logic from the application itself to the server software that it's running under. Just my opinion, of course, but if it was me, I'd either - - make the default CFM template strip the name of the directory out of the url and check it against the query. - use a url such as http://www.mycompany.com/contacts/BillHenderson , and put an extension-less file called contacts in the root. Make IIS pass files with no extension through CF and put your logic to get the name, check the query and re-locate, into that contacts file. I've used this myself many times on many different webservers, with no problems. Hope that helps! Alistair Alistair Davidson Application Developer www.smartgroups.com Freeserve.com PLC -Original Message- From: Bill Henderson [mailto:[EMAIL PROTECTED]] Sent: 01 August 2002 09:05 To: CF-Talk Subject: Can anybody see a problem with this? Hey All - The marketing department of my company wanted to have a list of directories with names of marketing contacts. (http://www.mycompany.com/BillHenderson/, etc) I first set up a tool using cfdirectory and cffile to create the directories and put the files in them. I found that making changes to the files in the directories or adding new directories or deleting the directories caused quite a lot of problems, not to mention the clutter it caused in the root directory of the site, so I came up with this idea, that does not actually use any custom directories at all, and I want to know if anybody can see possible security problems, server resource issues, etc. 1. The user enters the URL in browser with custom directory at the end 2. IIS catches the 404 error and uses a custom cfm template 3. The cfm template pulls the directory out of the url and checks it against a list of names from a cached query 4. If it find a match, it cf_locations to a template with custom content for the marketing contact 5. If no match is found, it cf_locations to the standard 404b.htm from IIS. Any insight would be appreciated. Bill Henderson [EMAIL PROTECTED] __ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: OT: SQL question
Off the top of my head, in SQL Server you can do it like this : SELECT PartNumber, 'FirstBitOfPartNumber' = LEFT( PartNumber, FIND( '.', PartNumber ) ) FROM blahblahblah If you wanted to just get matching rows, you can use that as a join condition, e.g. SELECT PartNumber FROM Table1 INNER JOIN Table2 ON Table2.PartNumber = LEFT( Table1.PartNumber, FIND( '.', Table1.PartNumber ) ) WHERE blah blah blah Hope that helps Alistair Alistair Davidson Application Developer www.smartgroups.com Freeserve.com PLC -Original Message- From: Alex [mailto:[EMAIL PROTECTED]] Sent: 29 July 2002 21:27 To: CF-Talk Subject: Re: OT: SQL question Great. You did not provide your database or setup. I can only assume you are working on a mainframe hitting DB2. On Mon, 29 Jul 2002, Phillip B wrote: I need to do this and don't know where to start. Compare part of a part number in one table to another table. The part numbers look like this. 12345.123 12345.234 12345.654 02nt911dc.123 02nt911dc.054 02thq5 02thq7 The part before the dot is all I want to use to compare to the other table which will only contain the first part. It would be something like this. 12345.123 = 12345 12345.234 = 12345 12345.654 = 12345 02nt911dc.123 = 02nt911dc 02nt911dc.054 = 02nt911dc 02thq5 = 02thq5 02thq7 = 02thq7 How would I do that using just sql statements? Maybe when I have the server import I could have it create an extra column that can contain a trimmed version of the part number. A master number of sorts. Just a thought. Thanks Phillip Broussard Tracker Marine Group 417-873-5957 __ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cfProcParam is being ignored?
Hi Andrew Try changing print @RetMsg / end transact sql code / to SELECT @RetMsg Alistair Alistair Davidson Application Developer www.smartgroups.com Freeserve.com PLC -Original Message- From: Andrew Peterson [mailto:[EMAIL PROTECTED]] Sent: 24 July 2002 15:03 To: CF-Talk Subject: cfProcParam is being ignored? Hi, I've got a Stored Procedure that functions as designed. However, when I call it from a CF template, my cfProcParam, an output variable that I wish to display, seems to be ignored. Here is my CF code: !--- begin cf code --- cfstoredproc datasource=WEDGETEST procedure=UpdateTraining cfProcParam cfsqltype=CF_SQL_VARCHAR type=Out variable=ReturnMsg dbvarname=@RetMsg /cfstoredproc cfoutput#ReturnMsg#/cfoutput !--- end cf code -- Unfortunately, ReturnMsg is not displayed, thought the code is executed. ReturnMsg is the value of @RetMsg, shown in an excerpt of the StoredProc below: / begin transact sql code / ALTER PROCEDURE dbo.UpdateTraining ( @RetVal int = NULL Output, @RetMsg nvarchar(255)= NULL Output) as -- Declare @ReturnMsg nvarchar(255) DELETE FROM SCO510 WHERE AGENCY_NO BETWEEN 701 AND 710 select @RetMsg = 'Deleted From 510 ' + CONVERT(varchar(5), @@RowCount) + ' rows.' UPDATE AGENCY_PKG_RECTYPE SET STATUS = 'Empty' where AGENCY_NO BETWEEN 701 AND 710 select @RetMsg = @RetMsg + 'Updated ' + CONVERT(varchar(5), @@RowCount) + ' rows to Empty in RecType table.' print @RetMsg / end transact sql code / In the Stored Proc itself, @RetMsg is displayed using the Print command. Do I have to somehow RETURN the value so that CF sees it? I've looked at the Return command in SQL Server but it does something different entirely. Thanks in advance. Andrew __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Querying a CSV file
Stephen This error means that it didn't recognize your field names, so you need to tell the driver about your datafile schema. If you're using the Microsoft text driver, it gets schema information from a file called schema.ini in the directory that the datasource is pointing to. The required format of this is available from MSDN, but it's a lot easier to use the wizard in the ODBC Data Sources tool - go to System DSN, select the datasource, click Configure, then Options, and Define Format. You can then associate fieldnames and formats with your text file Hope That Helps Alistair Alistair Davidson Applications Developer www.smartgroups.com Freeserve.com PLC -Original Message- From: Adams, Stephen [mailto:[EMAIL PROTECTED]] Sent: 24 July 2002 15:31 To: CF-Talk Subject: Querying a CSV file ** WESTMINSTER CITY COUNCIL Please refer to the disclaimer beneath this message ** I have a CSV file that I want to query. In my CSV file I have added a row with the column names in it, but when I try to query the file I getan error. This is my query: cfquery name=getAirPollution datasource=Pollution SELECT CGNOx, CGNO FROM Pollution.csv WHERE Date = 20723 AND Time = 1245 /cfquery And I get this error message. ODBC Error Code = 07001 (Wrong number of parameters) [Microsoft][ODBC Text Driver] Too few parameters. Expected 2. Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly. Now this is the first time I have tried to use a csv file as a datasource, the file is verified as a datasource in CF administrator, but I am having trouble writing the query. Any help would be great, thanks. Stephen ** Westminster City Council switchboard: +44 20 7641 6000 ** This E-Mail may contain information which is privileged, confidential and protected from disclosure. If you are not the intended recipient of this E-mail or any part of it, please telephone Westminster City Council immediately on receipt. You should not disclose the contents to any other person or take copies. ** __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFHTTP documentation.
Hi Wally It's a serial process, I'm afraid. The CFHTTP tag sends out its request and then sits there blocking further execution until it gets a response or times out. The only way round it would be to write a replacement CFX, probably in Java, that was multithreaded. HTH Al Alistair Davidson Application Developer Freeserve.com plc www.smartgroups.com -Original Message- From: Wally - Comcast [mailto:[EMAIL PROTECTED]] Sent: 08 July 2002 19:29 To: CF-Talk Subject: CFHTTP documentation. Does anyone have a good online source for CFHTTP documentation? I need to query several WEB search sites. Is it possible to initiate several CFHTTP requests and process them as they come in or does this have to be a serial process? Wally Randall __ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: QuerySim custom tag and Fusebox 3
Hi guys The problem is that thisTag.generatedcontent only captures content that would be destined for the output buffer. If enablecfoutputonly=YES has been called, thisTag.generatedContent is non-existent, unless the tag is called between CFOUTPUT tags. Walk it through - 1) The very first line in the FB3 core file (fbx_fusebox30_CFXX.cfm) sets cfsetting enablecfoutputonly=YES 2) Sections seven and nine of the FB3 core file includes fbx_settings.cfm. enablecfoutputonly is still YES, so any plain text is just ignored 3) Section ten includes fbx_switch.cfm, but does it like this - cfoutputcfinclude template=#FB_.fuseboxpath#fbx_Switch.cfm/cfoutput so THAT's why Cf_querysim works when included from fbx_switch, but not from fbx_settings Workaround - whenever you use a cf_querysim tag, nest it inside a Cfoutput block, like this cf_querysim cfoutput qry_myquery a,column,list your|query|data /cfoutput /cf_querysim or even cfoutput cf_querysim qry_myquery a,column,list your|query|data /cf_querysim /cfoutput Hope that helps, Alistair Alistair Davidson Application Developer Freeserve.com PLC www.smartgroups.com -Original Message- From: Hal Helms [mailto:[EMAIL PROTECTED]] Sent: 26 May 2002 17:07 To: CF-Talk Subject: RE: QuerySim custom tag and Fusebox 3 I just tried it out without problems. Here's what I have: A home circuit with a ShoppingCart circuit beneath it (as well as some other ones). In the FBX_Settings.cfm file of the ShoppingCart circuit, I cfinclude a page that has a QuerySim, CartSummary, on it. Then, in the FBX_Switch.cfm file for ShoppingCart, I respond to the fuseaction, display by cfincludeing dsp_ShoppingCart.cfm, a file that cfoutputs the CartSummary recordset. It works without a hitch. Is this the sort of thing that is failing for you? -Original Message- From: heirophant mm [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 26, 2002 10:41 AM To: CF-Talk Subject: RE: QuerySim custom tag and Fusebox 3 I'm actually using the #request.self#?fuseaction=#xfa.something# notation, i was just writing it in short hand by typing /index.cfm. That was confusing on my part, sorry. I have looked into the problem a little more, and here is what i have found. It seems that QuerySim, or any custom tag that uses thistag.generatedcontent, will work fine if it's in a fuse included through fbx_switch.cfm, in any circuit. However, I have one template using QuerySim that i include through fbx_settings.cfm. I have found that, when included through fbx_settings.cfm, thistag.generatedcontent turns up empty, for ANY custom tag i try to use. I also found that this happens in ANY circuit. -Original Message- Date: Sat, 25 May 2002 13:30:35 -0400 From: Hal Helms [EMAIL PROTECTED] Subject: RE: QuerySim custom tag and Fusebox 3 Message-ID: 000101c20411$e157ad90$c0d45c42@BigHal I use it in child circuits all the time without a problem. On a possibly related note, I'm wondering why are you using ../ notation to get back to the home circuit? -Original Message- From: heirophant mm [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 25, 2002 1:02 PM To: CF-Talk Subject: QuerySim custom tag and Fusebox 3 Hi everyone, I'm using the QuerySim custom tag (find it at www.halhelms.com) to assist in developing a Fusebox 3 site. When I use it in a template that I am viewing directly rather than through the Fusebox ( as in /index.cfm?fuseaction=circuit.fuse), it works fine. Also, QuerySim works fine when calling it through the Fusebox, if it is in the home circuit. However, when QuerySim is called in a template used by a child circuit, something wierd happens. I have found that the value of thistag.generatedcontent, which would hold the query contents i pass, is wiped out. Therefore, QuerySim has nothing to make a query out of. I know that the proper place to be using QuerySim is when you're testing individual fuses, especially before you have the real query fuses written, so you can say that i'm using QuerySim improperly anyway by using it within the fusebox itself. (in my defense, i have an acceptable reason to be doing this in this case and its only temporary, but i wont try to explain). Anyway, I thought it was strange that the value thistag.generatedcontent of a custom tag would be wiped out in that way. I have thoroughly tested this and found that, indeed, it only happens when calling it within the Fusebox, and only in a child circuit. I am afraid that this reveals some sort of subtle problem with Fusebox itself! But I am probably (and hopefully) wrong... Mike Mertsock Alfred University Web Team Outgrown your current e-mail service? Get a 25MB Inbox, POP3 Access, No Ads and No Taglines with LYCOS MAIL PLUS. http://login.mail.lycos.com/brandPage.shtml?pageId=plus FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives
RE: HTTP 500 Errors
I remember I had a problem like this on IIS. In the end, it was the Application Protection Level setting in IIS that solved it - http://www.macromedia.com/v1/handlers/index.cfm?ID=19537Method=Full HTH Alistair -Original Message- From: John Beynon [mailto:[EMAIL PROTECTED]] Sent: 22 May 2002 10:01 To: CF-Talk Subject: RE: HTTP 500 Errors Funnily enough my hosted site on intermedia.net did this this morning, restarting the server sorted it out. M$ site is it's usual helpful self: 500 - Internal server error. You see this error message for a wide variety of server-side errors. Your event viewer logs may contain more information about why this error occurs. Additionally, you can disable friendly HTTP error messages to receive a detailed description of the error. For additional information about how to disable friendly HTTP error messages, click the article number below to view the article in the Microsoft Knowledge Base: Q294807 HOWTO: Disable Internet Explorer 5 'Show Friendly HTTP Error Messages' Feature on the Server Side John. From: Marlon Moyer [mailto:[EMAIL PROTECTED]] Sent: 21 May 2002 21:55 To: CF-Talk Subject: HTTP 500 Errors Suddenly my site is starting to experience 500 errors for only certain users, and meanwhile other users can log in and out with no problems. There's really not any way of this site being too busy as it's and application for field offices so there's only 1 or 2 users at a time. Any ideas? Marlon __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Multiple Left Outer Joins
Hi Bud In SQL Server, it's SELECT T1.*, T2.*, T3.* FROM Table1 T1 LEFT OUTER JOIN table2 T2 ON T1.ID = T2.ID LEFT OUTER JOIN table3 T3 ON T1.ID = T3.ID LEFT OUTER JOIN table4 T4 ON T1.ID = T4.ID WHERE (whatever) Other DB's may differ, for instance, in Access, you need to do lots of weird nesting stuff with brackets, but that's how you'd do it on SQL HTH Alistair -Original Message- From: Bud [mailto:[EMAIL PROTECTED]] Sent: 19 May 2002 21:09 To: CF-Talk Subject: Multiple Left Outer Joins Hi all. Before I wreck my brain trying to figure this out, I'll ask here. :) Is there a way to do multiple Left Outer Joins off of a single table? I know how to join table 1 to table 2, then table 2 to table 3, etc. What I'd like to do is 3 separate Outer Joins to the same Left table in a single query: SELECT T1.*,T2.* FROM table1 T1 LEFT OUTER JOIN table2 T2 ON T1.ID = T2.ID WHERE T1.ID = #val(form.ID)# SELECT T1.*,T3.* FROM table1 T1 LEFT OUTER JOIN table3 T3 ON T1.ID = T3.ID WHERE T1.ID = #val(form.ID)# SELECT T1.*,T4.* FROM table1 T1 LEFT OUTER JOIN table4 T4 ON T1.ID = T4.ID WHERE T1.ID = #val(form.ID)# TIA -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFINTERNALDEBUG
Hi Scott I know that the PCODE action is used to recompile a CF template into PCode without executing it - very handy for refreshing a file in the template cache when Trusted Cache is on. You can use it like this: CFINTERNALDEBUG ACTION=pcode OUTVAR=r_var TEMPLATEPATH=#template# Although you have to do a little registry tweaking first - !--- if Trusted Cache is enabled --- CFREGISTRY ACTION=Get BRANCH=HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\Server ENTRY=AssumeTemplateCacheIsNotDirty TYPE=String VARIABLE=r_value cfif r_value neq 1 !--- update the CF trusted cache setting to 0 --- CFREGISTRY ACTION=Set BRANCH=HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\Server ENTRY=AssumeTemplateCacheIsNotDirty TYPE=String VALUE=0 !--- have CF reread the registry --- cfset temp = CFUSION_SETTINGS_REFRESH() !--- Refresh the template --- CFINTERNALDEBUG ACTION=pcode OUTVAR=r_var TEMPLATEPATH=#template# !--- turn truested cache back on --- CFREGISTRY ACTION=Set BRANCH=HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\Server ENTRY=AssumeTemplateCacheIsNotDirty TYPE=String VALUE=1 !--- have CF reread the registry --- cfset temp = CFUSION_SETTINGS_REFRESH() /cfif As this tag is undocumented and unsupported, I've no idea of how safe it is to do this. I've never had any problems doing it, but it's probably worth putting a cflock scope=server around it. HTH Alistair Alistair Davidson Application Developer Freeserve.com PLC www.smartgroups.com -Original Message- From: Boardworks Interactive [mailto:[EMAIL PROTECTED]] Sent: 17 May 2002 07:09 To: CF-Talk Subject: CFINTERNALDEBUG Does anyone know what this tag does? I was able to deduce that it had an attribute, ACTION which could be either BREAK, LEAK, PCODE, REPORTSTATE, SETBREAKALLOC and WRITEOUTPUT. Each ACTION has its own attributes, but I don't know what each of these actions does - morever what it outputs (as I would like to view it). I understand the MM doesn't support this tag, but I was wondering if any of you smart folks figured it out. TIA! SCOTT VAN VLIET BRD.WRKS INTERACTIVE T: 714.469.6805 E: [EMAIL PROTECTED] __ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: MSSQL w/ OLEDB or ODBC
Hi, At my last place we swapped all SQL drivers over from ODBC to OLEDB. We didn't really get much of a performance difference, but there was a noticeable increase in stability. I'd say it's definitely worth doing. Just be warned, we did find some niggling syntax differences in some obscure circumstances. Unfortunately, I can't remember exactly what stopped working and what we had to change it to, but it was pretty minor and had something to do with (I think) dates. Anyone else found that? HTH Alistair Davidson Application Developer Freeserve.com / Smartgroups.com -Original Message- From: Clint Tredway [mailto:[EMAIL PROTECTED]] Sent: 30 January 2002 17:52 To: CF-Talk Subject: Re: MSSQL w/ OLEDB or ODBC ODBC uses OLEDB so using OLEDB is faster. Plus, with CF4.5 you can use a single OLEDB connection and use it to change what database you look at. Its kind of a suedo DSNLess connection. HTH Clint -- Original Message -- from: Steve Oliver [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] date: Wed, 30 Jan 2002 12:53:06 -0500 What do most of you use with MSSQL? OLEDB or ODBC? I've read numerous pages that say OLEDB is a better choice, I know this is very true with Access dbases, but what about with MSSQL? I've tested an OLEDB connection with MSSQL and it picks up ODBC dates just fine, and the Booleans don't need to be converted either. I've seen numerous pages that say use OLEDB over ODBC with MSSQL, but I'd like to know other opinions before we switch everything over. __ steve oliver atnet solutions, inc. http://www.atnetsolutions.com __ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session variables
OK, here's one example - We have a system where a huge amount of config data needs to be retrieved from a database for each page. Just retrieving all the DB records takes about 2.5 seconds. If you were doing that every page, then you'll very quickly kill just about any server. So what we do is convert those DB records to structres, and store them in the Application scope. On each request, we check if the App structure exists, and if it doesn't (or if a particular parameter is passed in the url) call the code that initialises the structure. Then we duplicate the Application structure into the REQUEST scope, which only takes about 50 ms. how's that? -Original Message- From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] Sent: 09 November 2001 11:31 To: CF-Talk Subject: RE: Session variables There are legitimate uses for the Application scope. In what situations would you need to use the Application scope which couldn't be handled by the Request scope? I've never been able to think of any good examples. -- Aidan Whitehall [EMAIL PROTECTED] Macromedia ColdFusion Developer Fairbanks Environmental +44 (0)1695 51775 ~~ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: getting xxx from xxx
cfset result = REReplace( inputstring, ([^]+), \1 ) -Original Message- From: raphael [mailto:[EMAIL PROTECTED]] Sent: 09 November 2001 15:37 To: CF-Talk Subject: getting xxx from xxx How would this be accomplished? getting xxx from xxx I was going to do a find on both and and get the middle but I'm thinking of removing anything else then trimming left(1) and right(1) Raph. ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Generating reports in the background (update)
Aidan The way I've got round this before is to output the Your report is being generated page with a javascript function at the bottom that just does a self.location to the page which actually creates the report - e.g. pleasewait.cfm -- cfoutput Your report is being created - please wait BR img src=hourglass_anim.gif script language=javascript self.location.href = 'make_and_display_report.cfm'; /script /cfoutput It's always worked OK for me. Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] Sent: 31 October 2001 11:44 To: CF-Talk Subject: Re: Generating reports in the background (update) I'm trying to trigger a ColdFusion template that generates a report in the background. I want to start the process and then redirect the browser to a your report is being created page. Try as I might, I can't get the report started without the browser being forced to wait at some point for the report to be finished. The report generation needs to be triggered on-demand. Updating a CFSCHEDULE and then running it straight away doesn't seem to work (I guess because it must be set at least 15 minutes in the future). Calling the report making template via CFHTTP before using CFLOCATION doesn't work, as the page sits there until the report is finished before redirecting. Using CFHTTP at the end of the your report is being created also makes that page take forever to be rendered. If I was using CF5, I guess I could CFFLUSH the page before doing CFHTTP last, but we're stuck with v4.0.1. I can't call CFML.EXE via a URL and CFEXECUTE is only 4.5+. Any ideas? I've run out... Thanks. -- Aidan Whitehall [EMAIL PROTECTED] Macromedia ColdFusion Developer Fairbanks Environmental +44 (0)1695 51775 ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: failed retrieval of cached queries
Hi Tim I don't know how much of this response will be relevant to your situation, but here's how we managed to resolve this problem - (apologies if any of this seems patronising, but I don't know what level to aim at here, so I'll explain everything!) We had this problem, and it was driving us absolutely nuts for months. Yeah, sure, some of our old sites (written before any of the current developers had joined the company) had some dubious locking strategies, but the errors kept being thrown on our NEW sites, which used REQUEST variables rather than APPLICATION variables, and had EVERY read/write to a shared scope inside a CFLOCK. After many LNG head-scratching hours, we finally worked out that the following situation could occur - 1) Some old sites were using statements like this - cfquery name=qry_productfeatures datasource=#DSN# cachedwithin=#APPLICATION.querycachetime# 2) Although WRITES to the application variables were cflocked, statements such as the above were not. 3) If that CFQUERY statement was run at exactly the same time as APPLICATION.QueryCacheTime was being set, then the query would still be executed and the resultset cached, but the time for which to hold the resultset in the cache could be corrupt. 4) New sites were also running statements like this cfquery name=qry_productfeatures datasource=#REQUEST.DSN# cachedwithin=#REQUEST.querycachetime# against the same datasource as the old sites, and just occasionally, the SQL might match exactly. 5) The CF engine checks to see if it already has a query called qry_productfeatures on that datasource with the same SQL. If it does, it checks the current time against the cached query's cache time, to see if the query has expired. 6) If the cached query is corrupt, then the cfquery... statement does NOT return an catchable exception - the CF server keeps trying to retrieve it, and eventually (after about 60 seconds, in our case) it gives up, and the CF sub-system throws an error WITHOUT returning execution to your template. 7) For all the time that the engine is trying to retrieve that query, the thread used to process that request is unresponsive. It does NOT timeout at the Timeout request at X seconds setting in the CF administrator. 8) If this is on a frequently hit page, it can very easily clog up the whole thread pool, and leave your CF server unresponsive. 9) The only way to free up the threads again is to bounce the CF service. Conclusions --- 1) DON'T use application variables if you don't have to! Use the Request scope instead. 2) If you HAVE to use application variables (e.g. to store complex persistent structures that are based on huge DB queries that take ages to run), then Duplicate() the application structure into the REQUEST scope in your application.cfm, like this - cflock name=(some name) timeout=2 throwontimeout=YES cfset REQUEST = Duplicate( APPLICATION ) /cflock 3) Make sure ANY references to shared scopes are inside a lock of the same name (or scope) as the writes to those variables. Enforce this on a CODE level- don't rely on the Automatic locking setting in CFAdmin, because this only checks cfset ... statements, and DOES NOT catch implied reads like the cfquery ...cachedwithin=#APPLICATION.QueryCacheTime# statement. Hope that helps Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Tim Stadinski [mailto:[EMAIL PROTECTED]] Sent: 25 October 2001 22:12 To: CF-Talk Subject: failed retrieval of cached queries Has anyone seen the following error: CFQuery Retrieval of cached query failedpThe error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (401:3) to (401:153) in the template file I have posted this on the forums, but have not got a response and it seems like there are others with similiar issues. thanks in advance. Timothy Stadinski Afternic.com [EMAIL PROTECTED] ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: failed retrieval of cached queries
Hmmmtricky! 1) How do you determine if it is corrupt? Um if it throws a Retrieval of cached query failed error, then it's corrupt! I know it's a cop-out answer, but we haven't been able to find any other way - you don't seem to be able to CFCATCH the error. 2) What makes a cached query corrupt? Well, the situation in 3) in my original response is one way - there's probably many others. Here's a quote from Greg Gauthier (Allaire Sr. Tech. Support Engineer) in the forums - This error typically happens in one of three cases: 1) If you were trying to insert a query into a full cache where all of the queries were being used you'd get the error. 2) Another place where this could happen is if the cache max size is set to zero and you try to cache a query 3) Finally this occurs when global access to the cache is granted initially, but because the page timeout has been reached the retrieval fails. Does the page where this error occurs take a long time to run? Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Tim Stadinski [mailto:[EMAIL PROTECTED]] Sent: 29 October 2001 15:38 To: CF-Talk Subject: RE: failed retrieval of cached queries Of all the points you have made, I agree about the locking issues, but that is not the case here. One point that I am curious about (6)If the cached query is corrupt How can you determine if it is corrupt and what makes a cached query corrupt? Thanks Tim -Original Message- From: Alistair Davidson [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 3:50 AM To: CF-Talk Subject: RE: failed retrieval of cached queries Hi Tim I don't know how much of this response will be relevant to your situation, but here's how we managed to resolve this problem - (apologies if any of this seems patronising, but I don't know what level to aim at here, so I'll explain everything!) We had this problem, and it was driving us absolutely nuts for months. Yeah, sure, some of our old sites (written before any of the current developers had joined the company) had some dubious locking strategies, but the errors kept being thrown on our NEW sites, which used REQUEST variables rather than APPLICATION variables, and had EVERY read/write to a shared scope inside a CFLOCK. After many LNG head-scratching hours, we finally worked out that the following situation could occur - 1) Some old sites were using statements like this - cfquery name=qry_productfeatures datasource=#DSN# cachedwithin=#APPLICATION.querycachetime# 2) Although WRITES to the application variables were cflocked, statements such as the above were not. 3) If that CFQUERY statement was run at exactly the same time as APPLICATION.QueryCacheTime was being set, then the query would still be executed and the resultset cached, but the time for which to hold the resultset in the cache could be corrupt. 4) New sites were also running statements like this cfquery name=qry_productfeatures datasource=#REQUEST.DSN# cachedwithin=#REQUEST.querycachetime# against the same datasource as the old sites, and just occasionally, the SQL might match exactly. 5) The CF engine checks to see if it already has a query called qry_productfeatures on that datasource with the same SQL. If it does, it checks the current time against the cached query's cache time, to see if the query has expired. 6) If the cached query is corrupt, then the cfquery... statement does NOT return an catchable exception - the CF server keeps trying to retrieve it, and eventually (after about 60 seconds, in our case) it gives up, and the CF sub-system throws an error WITHOUT returning execution to your template. 7) For all the time that the engine is trying to retrieve that query, the thread used to process that request is unresponsive. It does NOT timeout at the Timeout request at X seconds setting in the CF administrator. 8) If this is on a frequently hit page, it can very easily clog up the whole thread pool, and leave your CF server unresponsive. 9) The only way to free up the threads again is to bounce the CF service. Conclusions --- 1) DON'T use application variables if you don't have to! Use the Request scope instead. 2) If you HAVE to use application variables (e.g. to store complex persistent structures that are based on huge DB queries that take ages to run), then Duplicate() the application structure into the REQUEST scope in your application.cfm, like this - cflock name=(some name) timeout=2 throwontimeout=YES cfset REQUEST = Duplicate( APPLICATION ) /cflock 3) Make sure ANY references to shared scopes are inside a lock of the same name (or scope) as the writes to those variables. Enforce this on a CODE level- don't rely on the Automatic locking setting in CFAdmin, because this only checks cfset ... statements, and DOES NOT catch implied reads like the cfquery ...cachedwithin=#APPLICATION.QueryCacheTime# statement. Hope that helps
RE: Regular Expression
Michael Try REReplace( string, .*(URL=)([^[:space:]]+).*, \2 ) A loose translation - 1) look for any character (.) any number of times(*), followed by 2) the string URL=, followed by 3) anything other than a space ([^[:space:]]), at least once (+) 4) Replace that whole lot with whatever bit of the string matched part 3. Hope that helps Alistair Davidson Senior Developer Rocom New Media www.rocomx.net ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL question grouping, ordering, sorting
Willy Try something like - SELECT TOP 10 (table).searchstring, 'NoSearches' = COUNT( tableAlias.ID ) FROM (table) INNER JOIN (table) tableAlias ON (table).searchstring = tableAlias.searchstring GROUP BY (table.searchstring) ORDER BY COUNT( tableAlias.ID ) DESC ( replace (table) with your table name ) That should do it - for each row in (table) it will return all rows with the same searchstring, and the COUNT function used with the GROUP BY clause will 'roll-up' the results HTH Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There Is No Spoon -Original Message- From: Willy Ray [mailto:[EMAIL PROTECTED]] Sent: 22 October 2001 16:07 To: CF-Talk Subject: SQL question grouping, ordering, sorting Ok, I have a database of search strings with which users of the site have hit my search engine. I want to build a viewer so I can go in and see what people are doing without actually cracking into the database. My database isn't doing anything fancy. It's one table, consisting, essentially, of id, searchstring, casesensitive... What I want is to be able to query the database, and display the 10 or 15 most searched strings. I'm just not sure how to go about it. I can GROUP BY searchstring that get's me close, and culls out duplicate strings, but I don't know how I'd get from there to top 5 strings: 1. Happy and Go and Lucky (16 searches) 2. Moo Cow (10 searches) 3. etc. 4. etc. Any thoughts? Willy Ray ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: client information
Emmet try: http://msdn.microsoft.com/ie -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED]] Sent: 02 October 2001 19:32 To: CF-Talk Subject: client information Ive seen all this information before but cant seem to track it down. Can someone provide me with all the client variables available, such as referer, browser, screen resolution, colors, and os? Thanks ~~ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: 2 Submit Buttons on one form
Mark, You could do it client-side or server-side. Client-side would involve some javascript like this - form action=page1.cfm input type=submit value=Submit to page1 input type=button value=Submit to page2 onclick=this.form.action='page2.cfm';this.form.submit(); /form It's cleaner in terms of code, but beware of older browsers having dodgy support for javascript. Server-side, you could make your form like this - form action=page1.cfm input type=submit value=Submit to page1 input type=submit value=Submit to page2 /form and then on the processing page - !--- server - side code --- Cfif FORM.submit EQ Submit to page2 cfinclude template=page2.cfm cfelse cfinclude template=page1.cfm /cfif HTH Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Mark Leder [mailto:[EMAIL PROTECTED]] Sent: 02 October 2001 16:23 To: CF-Talk Subject: 2 Submit Buttons on one form Is it possible to place two submit buttons on one form, each button calling a different action (template). If so, how would it be done? Thanks, Mark ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: WDDX
Depends where you store it! If its a CLIENT variable, then it depends on where you're storing client variables - but just as a guide, I've run into problems storing more than 64k in a client variable stored in a SQL Server 7.0 DB Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Duane Boudreau [mailto:[EMAIL PROTECTED]] Sent: 24 September 2001 17:34 To: CF-Talk Subject: WDDX Is there any limit to the length that a string can be inside a wddx packet? TIA, ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: WDDX and structures
John, To encode (serialize) a structure into WDDX - CFWDDX action=CFML2WDDX input=#MyStructure# output=MyWDDXPacket will create a string called MyWDDXPacket with the WDDX encoding of MyStructure. To get it back (de-serialize) - CFWDDX action=WDDX2CFML input=#myWDDXPacket# output=MyNewStructure will create a structure called MyNewStructure that should be an EXACT duplication of the original variable. You can then loop round the structure and convert it's keys into simple values like this - cfloop collection=#myNewStructure# item=key cfset #key# = myNewStructure[key] /cfloop So if your structure was SESSION -category -id -name -number -personalized -price -qty -weight -session id you'll then get simple values (un-scoped) called category id name number personalized price qty weight session id hope that helps Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 24 September 2001 15:12 To: CF-Talk Subject: WDDX and structures Hello all, My first post to the group - hopefully not asking questions that will send eyes rolling. Situation: I'm trying to pass a structure of items from an application to the secure portion of the site to complete checkout/ordering process. The main site sits at http://www.foo.com and the secure portion is on the same server but at a different domain http://secure.isp.com/foo - obviously, session variables won't exist from one site to the next so I'm looking at options for passing the shopping cart structure and a session id#. I could write to a temporary database prior to leaving www.foo.com, then querying said database and re-initializing the needed variables on secure.isp.com/foo but I'm wondering if that's the best approach. Research brought me to the doorstep of WDDX (cfwddx) and it seems like that it *should* work ideally for avoiding database write/reads. Great! Problem: I've been exploring code snippets and examples for just how to achieve the results and I'm stumped - I've had some luck in creating the WDDX packet and can output it's contents for testing using htmleditformat() but I can't figure out how to actually loop through the packet and breakout the variables for use on the secure portion of the site. Questions: 1. Is using WDDX the better approach for accomplishing my task or should I give up and just write to the db? 2. Is anyone doing what I'm attempting and, if so, could you demonstrate how your code works for me? Please? 3. Is there another approach that I should be aware of instead? Add'l info: * I've RTFM - and site after site, post after post still grasping... * The packet is only needed one-way (from main site to secure) and will be discarded after pulling out the variables for secure processing. I don't know if that makes any diff or not * There is a total of 9 variables that exist in the session structure: category id name number personalized price qty weight session id# * Each variable can/will contain several items (except for session id#): id: 23, 356, 698 name: foo1, foo2, foo3 etc... * I'd provide code that I'm using but there really isn't anything more than just some test code at this point. Sorry. I await all responses and hope that some wise soul can help guide me to my goal.your time is appreciated and I thank you in advance. Stumped, John Ramsey [EMAIL PROTECTED] FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Find in-coming form fields
Steven Every form post contains a field called Fieldnames, which is a comma-separated list of fields in the form. So you could do - cfloop list=#FORM.fieldnames# index=i FORM.#i# = #FORM[i]# /cfloop Hope that helps Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Steven Monaghan [mailto:[EMAIL PROTECTED]] Sent: 24 September 2001 15:34 To: CF-Talk Subject: Find in-coming form fields I have a situation where I need to accept a form, but I don't know the names of the form fields that are set. I can't access the posting form, since it's hidden in someone else's app, so I can't find the names that way. I want to build a simple page where I can accept the post, then dump out all of the values in memory into an e-mail. I looked at the CFDUMP tag, but that requires the variable name. I'm new to Cold Fusion, so please indulge me if this is a simple task. Thanks for any help, Steve - Steven Monaghan Oracle DBA / Cold Fusion Developer MSC Industrial Direct Co., Inc. Melville, NY [EMAIL PROTECTED] http://www.mscdirect.com - This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law. If you are not the intended recipient, please do not read, copy, use or disclose the contents of this communication to others. Please notify the sender that you have received this e-mail in error by replying to the e-mail. Please then delete the e-mail and destroy any ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL question about JOIN
Chad, These two queries are NOT doing the same thing! In your second query, the FROM statement and WHERE clause FROM JOBINFO, ACTIVITYLOG WHERE JOBINFO.JOBNUM = ACTIVITYLOG.JOBNUM imply an INNER JOIN, not a LEFT OUTER JOIN. This will only select rows from either table where the JOBNUM field on both tables match, which is an INNER JOIN. In your first query, the section FROM JOBINFO LEFT OUTER JOIN ACTIVITYLOG ON JOBINFO.JOBNUM = ACTIVITYLOG.JOBNUM will return ALL records from JOBINFO, and for each of those records, it will also return all records from ACTIVITYLOG where the JOBNUM field matches. Any records on JOBINFO that DON'T have a matching record in ACTIVITYLOG will still be returned, but the query row for that record will have NULLs in all fields that come from ACTIVITYLOG. That's why the LEFT OUTER JOIN query is taking longer. You should always use explicit join statements in queries for three reasons - 1) It makes the most of the DB engine's query optimiser - I inherited an old site where all queries used the implied join, as in your second query. Just going through and changing them all to explicit join statements cut the execution time by (on average) 50%. 2) You can force join types to make the best use of memory/cpu resources (at least on SQL server, anyway). Sometimes, really complicated queries can be sped up by huge amounts, just by explicitly specifying a HASH JOIN. 3) It's much clearer syntax, and it allows you to separate the JOIN conditions from the selection conditions - example: SELECT Products.Description, Brands.Name AS BrandName, Categories.Title AS CategoryTitle FROM products INNER JOIN Brands ON Brands.Code = Products.BrandCode INNER JOIN Categories ON Categories.Code = Products.CategoryCode WHERE products.description LIKE '%#search_string#%' AND NOT(products.restricted = 1) as compared to: SELECT Products.Description, Brands.Name AS BrandName, Categories.Title AS CategoryTitle FROM products, brand, categories WHERE products.brandcode = brands.code AND products.categorycode = categories.code AND products.description LIKE '%#search_string#%' AND NOT(products.restricted = 1) Hope that helps Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: 18 September 2001 18:45 To: CF-Talk Subject: SQL question about JOIN The first query takes 9seconds to process, the 2second query takes 1seconds to process. They return the same data. Why should you use an LEFT OUTER JOIN, or any JOIN for that matter when you can say WHERE JOBINFO.JOBNUM = ACTIVITYLOG.JOBNUM??? cfquery name=ACTIVITIES datasource=servalent dbtype=ODBC SELECT JOBINFO.JOBNUM, JOBINFO.JOBNAME, JOBINFO.COMPANYNAME, ACTIVITYLOG.LOGIN, ACTIVITYLOG.LOGOUT, ACTIVITYLOG.EMPLOYEENAME, ACTIVITYLOG.EMPLOYEENUM, ACTIVITYLOG.ACTIVITYDESCRIPTION FROM JOBINFO LEFT OUTER JOIN ACTIVITYLOG ON JOBINFO.JOBNUM = ACTIVITYLOG.JOBNUM WHERE ACTIVITYLOG.EMPLOYEENUM = #EMPLOYEENUM# AND ACTIVITYLOG.LOGOUT is null AND ACTIVITYLOG.LOGIN is not null ORDER BY JOBINFO.JOBNUM, ACTIVITYLOG.LOGIN /cfquery cfquery name=ACTIVITIES datasource=servalent dbtype=ODBC SELECT JOBINFO.JOBNUM, JOBINFO.JOBNAME, JOBINFO.COMPANYNAME, ACTIVITYLOG.LOGIN, ACTIVITYLOG.LOGOUT, ACTIVITYLOG.EMPLOYEENAME, ACTIVITYLOG.EMPLOYEENUM, ACTIVITYLOG.ACTIVITYDESCRIPTION FROM JOBINFO, ACTIVITYLOG WHERE JOBINFO.JOBNUM = ACTIVITYLOG.JOBNUM AND ACTIVITYLOG.EMPLOYEENUM = #EMPLOYEENUM# AND ACTIVITYLOG.LOGOUT is null AND ACTIVITYLOG.LOGIN is not null ORDER BY JOBINFO.JOBNUM, ACTIVITYLOG.LOGIN /cfquery ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Need your opinion - PLEASE!
There's a common idea amongst database guys that NULLs are evil, but I think that's mainly because they can screw up joins and introduce three-valued logic into queries. For an example, if you have (say) a field called nullfield that contains a NULL value - nullfield 0 will return false. However, NOT( nullfield 0 ) will ALSO return false. It's not greater than zero, but it's not NOT greater than zero either - it's undefined. The only logic statement about it that will return true, is nullfield IS NULL Or if it's a string field - LEN( nullfield ) 0 is false, and so is NOT( LEN( nullfield ) 0 ) again, only nullfield IS NULL will be true. So you have to remember to explicitly account for NULLs in all of your queries and join statements. Apart from that, I don't there's anything inherently 'bad' about nulls, so long as you and anyone who writes queries on the data remember that they may be there and how to deal with them. In my view they can occasionally be very useful, for example, determining when a field has been set to empty, or when it has never been set at all. Just my 2p worth Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 07 September 2001 16:53 To: CF-Talk Subject: Need your opinion - PLEASE! I need to your opinions: Currently our database allows nulls on all fields besides primary keys and fields we have specified as wanting a default value. We now have database support outside of ourselves and their opinion is to not allow nulls and have a default value of a blank space. Is there a reason to populate blanks vs. allowing nulls as defaults within any given table. My opinion: If the database has been started with allowing nulls in fields then why change to defaulting blank spaces mid stream and confuse the developers from today moving forward. I need to know if I'm off target here. Your input is greatly valued. Casey Cook ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: HTTP 500 Errors
Check your IIS Application Protection Level. On the properties of your site in IIS, at the bottom of (I think) the Home Directory tab, there's a dropdown box called Application Protection. By default, it's set to Medium (Pooled), and that setting can cause 500 errors. It should always be set to Low (IIS process) for CF sites. Hope that helps Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Ben Koshy [mailto:[EMAIL PROTECTED]] Sent: 06 September 2001 20:50 To: CF-Talk Subject: HTTP 500 Errors Recently, after a new install of Win 2K, patches etc. And Cold Fusion 5.0, I've been getting the odd Http 500 Server Error Message from IIS 5.0. And sometimes after 1 reload it goes away. Other times I can reload till I'm blue in the face, I have to restart the website that's affected. The weird thing is that other sites running Cold Fusion are not affected. And it appears to affect sites randomly. All the sites in question are connected to an SQL 2000 Server. Any ideas? ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Checking for NULL
I generally use cfif Len(Trim(qQuery.field)) EQ 0 Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Thomas Chiverton [mailto:[EMAIL PROTECTED]] Sent: 05 September 2001 15:48 To: CF-Talk Subject: Checking for NULL How do I compare a field for a NULL value ? cfif qQuery.field is NULL ? Regards, Thomas Chiverton Intranet Architect 01565 757 909 The web is the borderless embodiment of every abstraction ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: brain far
You need a closing bracket ! cfquery datasource=#WME.DSN# INSERT INTO Coupon (Vendor_ID, C_Title, C_Details, C_Inst, C_Valid, C_Office, Venue_City_ID) Values (#qGetLastID.LastID#, '#Form.C_Title#', '#Form.C_Details#', '#Form.C_Inst#', '#Form.C_Valid#', '#Form.C_Office#', '#Form.Venue#') /cfquery alistair Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon -Original Message- From: Bruce Sorge [mailto:[EMAIL PROTECTED]] Sent: 05 September 2001 14:54 To: CF-Talk Subject: brain far Question, I am having a brain fart. I am entering information into a database, and one of the fields takes in a comma separated list. The insert query is; cfquery datasource=#WME.DSN# INSERT INTO Coupon (Vendor_ID, C_Title, C_Details, C_Inst, C_Valid, C_Office, Venue_City_ID) Values (#qGetLastID.LastID#, '#Form.C_Title#', '#Form.C_Details#', '#Form.C_Inst#', '#Form.C_Valid#', '#Form.C_Office#', '#Form.Venue#' /cfquery The Venue_City_ID is the comma separated list. The field in the DB is a text field (SQL Server 7). When I view the output, I get something like '3,4,5'. I would think that this would be OK since everything is inside of single quotes. However, I am receiving errors. ODBC Error Code = 37000 (Syntax error or access violation) [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect syntax near '3,4,5'. SQL = INSERT INTO Coupon (Vendor_ID, C_Title, C_Details, C_Inst, C_Valid, C_Office, Venue_City_ID) Values (12, 'Ski Time', 'Test', 'Test', 'Test', 'Test', '3,4,5' I know that there is a simple solution, but it really escapes me. This is what happens when you have 5 projects all going at once. ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Retrieval of cached query failed error
Hi all The saga of our bizarre server errors continues anyone seen (and more importantly, FIXED!) this one before? Retrieval of cached query failed I've scoured the Allaire forums, and the only answers I found were - This error typically happens in one of three cases: 1) If you were trying to insert a query into a full cache where all of the queries were being used you'd get the error. 2) Another place where this could happen is if the cache max size is set to zero and you try to cache a query 3) Finally this occurs when global access to the cache is granted initially, but because the page timeout has been reached the retrieval fails. Well, our server (Win2k, CF4.5.2) has 1.3Gb of RAM, of which only 400Meg or so ever gets used, and we have the maximum number of cached queries set to 1500 (yes, fifteen hundred) so I don't think 1 or 2 are likely. The pages where this is occurring are not slow-running pages, they usually execute in less than a second, and our timeout is set to ten seconds. The server is not even under particularly heavy load - less than 10,000 page impressions a day. Any ideas? Cheers, Alistair Davidson Senior Developer Rocom New Media www.rocomx.net There is no spoon ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL 7.0
text (or ntext if you need unicode support) -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED]] Sent: 27 July 2001 16:28 To: CF-Talk Subject: SQL 7.0 What is the equivalent to memo in ms SQL 7.0, for the life of me my mind has gone to the fairies on this one! ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: URL Hacks - Solution
I might be wrong, but I think that Access will only allow one SQL statement per query, that's why the ; DROP TABLE attack won't work. As for other SQL commands that could cause damage - how about exec xp_cmdshell which allows you to execute DOS commands on the server? You don't need to think very much before seeing the damage THAT one could do. -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 14:48 To: CF-Talk Subject: RE: URL Hacks - Solution I tried this kind of attack on a test page hooked up to a Access Database, and could not get Access to drop the table. Does Access not recognize the Drop Table SQL command? Im also wonder what other SQL commands could be passed other than DROP that could cause damage. Im really glad this subject has come up. At 05:42 PM 7/9/2001 -0400, you wrote: I think the script is a good first attempt and seems to address the URL hack threads previously that have gone around. so programatically (SQL wise) what else might one post in the string to pickup further data???... May the SQL gods speak... ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Temporarily disabling DB constraints
In enterprise manager, you can go into the table properties, find the constraint in the dropdown box and uncheck 'ENABLE CONSTRAINT FOR REPLICATION'. That works in SQL 7, I don't know about 2000 -Original Message- From: stas [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 16:00 To: CF-Talk Subject: Temporarily disabling DB constraints Hello, I'm using MS SQL2000 and need to replicate data from one box to another. The process is failing because of certain constraints. Is there a non-hack workaround to this issue? Thanks. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Data Validation
jerry, how about parseFloat() or parseInt(), depending on whether you only want integers? something like function check_numeric( obj ) { // parseInt() returns NaN (Not a Number) // if it can't parse an integer out of the string if( isNaN( obj.value.parseInt() ) ) { alert( That is not a number! ); obj.focus(); return false; } else return true; } and your input box can check this onblur (when it loses focus) like so - input name=numberbox type=text .. onblur=check_numeric(this); or you can check it in the form.onsubmit() - form .. onsubmit=return(check_numeric( numberbox )); A good reference for JS (and VBS) functions can be found at http://msdn.microsoft.com/scripting/default.htm Hope that helps Alistair Davidson Senior Web Developer Rocom New Media http://www.rocomx.net -Original Message- From: Jerry Staple [mailto:[EMAIL PROTECTED]] Sent: 05 July 2001 09:07 To: CF-Talk Subject: Data Validation Hi, Could anyone inform me of the best javascript function to validate a textbox, so that only a number can be entered. Many Thanks Jerry Staple ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: OT BUT URGENT: IIS stability
Thanks to all of you for your help - after a long sleepless weekend, it finally turned out to be a combination of 1) Dodgy network card on the DB server 2) Network collisions on the LAN 3) Repeated DoS attacks 4) Brute-force password-cracking attempts 5) A dodgy router at the ISP 6) IIS needing a rebuild 7) A missing TOP 1 clause in a query 8) The two servers not wanting to talk to each other on the domain (getting rid of the domain controller status on the SQL server helped) .phew! Thanks again - if you're ever in Yorkshire, England, I'll buy you a pint! Cheers, Alistair -Original Message- From: Marc Edwards [mailto:[EMAIL PROTECTED]] Sent: 08 June 2001 20:25 To: CF-Talk Subject: Re: OT BUT URGENT: IIS stability Hmm. Quite honestly, from my experience, having a stable IIS deployment seems largely a matter of luck, and is subject to your particular recipe of Service pack versions, configuration options, the choice of IIS packages you have installed (I remember on particular system where installing the html web/ftp server administration option caused HUGE problems), peripherals and drivers on the machine, and the server hardware itself. I've experienced systems that run for months without trouble, and others that need redoing every few months, even though they have the same software, installed from the same set of CD's, on identical models of computers ordered at the same time from the same manufacturer! My suggestion to you is just to rebuild the sucker, and not waste time trying to pinpoint the source of the trouble, as in most cases you probably won't find it. Then when you've got a nice clean and reliable install up and running, DON'T TOUCH IT!! Don't try to add any other pieces of software to that server, just let it be your web/app server and nothing else. You might also want to consider migrating to Win2K. From what I've seen in the few months I've been using it in production type environments (we waited for a respectable time to give time for the worst bugs to be identified and sorted out, which is a practice I stick to religiously and unreservedly recommend to anyone deploying on ANY and every new Microsoft product or new version release) it seems to be considerably less finicky. These views may seem a bit extreme to some people, but since I'm one of the guys that needs to mobilise at 3AM , on weekends or on public holidays if something goes wrong, I have good reasons for having them.. - Original Message - From: Alistair Davidson [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, June 09, 2001 1:02 AM Subject: OT BUT URGENT: IIS stability Hi guys ( gals) Sorry for the OT post, but I REALLY need help on this one, people's jobs are on the line. We have a serious problem with stability on IIS 5, Win 2K, CF 4.5.2. IIS has suddenly started to die. Symptoms include - - Existing virtual directories get lost. VDir's that have been working fine for 6 months suddenly return This page cannot be displayed IIS errors. If you delete the VDir and recreate it, it works again. - CF pages take forever to return. Flat HTML pages are responding reasonably well, but all the images now take forever to download. Restarting the CF service seems to help, but only for about half an hour, then it returns. - FTP transfer rates have gone down from over 200K / second to about 5 BYTES / second. My first thought was a runaway CF process somewhere, but when we look at performance monitor on the CF/IIS server, CPU usage is only at 5% and memory usage is minimal. Then we thought it might be persistent database locks, but we've eliminated that. Performance monitor on the DB server shows only minimal CPU / memory usage too. We have CF and IIS on one server (Dual PIII 800, 1.3GB RAM) and SQL running on another. The SQL server is set up as the domain controller. CFSTAT shows that the database response time is fine, it's just taking ages for requests to get to from the server. I know that at my last job, IIS was rebuilt as a regular maintenance task every two or three months. This installation of IIS has been for the last five or six months until this last week. And no code has changed in the last three weeks. Has anyone else had similar problems? How often do you all have to rebuild / re-install IIS ? I need some figures to give to the management ASAP, as they're starting to growl for blood. Mail me directly if you like Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT BUT URGENT: IIS stability
Hi guys ( gals) Sorry for the OT post, but I REALLY need help on this one, people's jobs are on the line. We have a serious problem with stability on IIS 5, Win 2K, CF 4.5.2. IIS has suddenly started to die. Symptoms include - - Existing virtual directories get lost. VDir's that have been working fine for 6 months suddenly return This page cannot be displayed IIS errors. If you delete the VDir and recreate it, it works again. - CF pages take forever to return. Flat HTML pages are responding reasonably well, but all the images now take forever to download. Restarting the CF service seems to help, but only for about half an hour, then it returns. - FTP transfer rates have gone down from over 200K / second to about 5 BYTES / second. My first thought was a runaway CF process somewhere, but when we look at performance monitor on the CF/IIS server, CPU usage is only at 5% and memory usage is minimal. Then we thought it might be persistent database locks, but we've eliminated that. Performance monitor on the DB server shows only minimal CPU / memory usage too. We have CF and IIS on one server (Dual PIII 800, 1.3GB RAM) and SQL running on another. The SQL server is set up as the domain controller. CFSTAT shows that the database response time is fine, it's just taking ages for requests to get to from the server. I know that at my last job, IIS was rebuilt as a regular maintenance task every two or three months. This installation of IIS has been for the last five or six months until this last week. And no code has changed in the last three weeks. Has anyone else had similar problems? How often do you all have to rebuild / re-install IIS ? I need some figures to give to the management ASAP, as they're starting to growl for blood. Mail me directly if you like Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT but URGENT - IIS
Hi guys ( gals) Sorry for the OT post, but I REALLY need help on this one, developer's jobs are on the line. We have a serious problem with stability on IIS 5, Win 2K, CF 4.5.2. IIS has suddenly started to die. Symptoms include - - Existing virtual directories get lost. VDir's that have been working fine for 6 months suddenly return This page cannot be displayed IIS errors. If you delete the VDir and recreate it, it works again. - CF pages take forever to return. Flat HTML pages are responding reasonably well, but all the images now take forever to download. Restarting the CF service seems to help, but only for about half an hour, then it returns. - FTP transfer rates have gone down from over 200K / second to about 5 BYTES / second. My first thought was a runaway CF process somewhere, but when we look at performance monitor on the CF/IIS server, CPU usage is only at 5% and memory usage is minimal. Then we thought it might be persistent database locks, but we've eliminated that. Performance monitor on the DB server shows only minimal CPU / memory usage too. We have CF and IIS on one server (Dual PIII 800, 1.3GB RAM) and SQL running on another. The SQL server is set up as the domain controller. CFSTAT shows that the database response time is fine. Performance tracking code in the applications show that CF is running the pages slower than usual, but a page that takes 1.5seconds to execute server-side is taking over thirty seconds to return to the client. I know that at my last job, IIS was rebuilt as a regular maintenance task every two or three months. This installation of IIS has been for the last five or six months until this last week. And no code has changed in the last three weeks. Has anyone else had similar problems? How often do you all have to rebuild / re-install IIS ? I need some figures to give to the management ASAP, as they're starting to growl for blood. Mail me directly if you like Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK viability?
YOu might be better to do something like this - !--- Application.cfm --- cflock type=exclusive !--- Create your application variables here --- /cflock !--- CHEAT by copying the application structure --- !--- into a local struct that you can read from as --- !--- much as you want --- cflock type=readonly ... cfset theAPPLICATION = Duplicate( Application ) /cflock That way you lock the minimum amount of code for the minimum amount of time, and you're free to read from that local struct without having to worry about locking. HTH Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Steve Vosloo [mailto:[EMAIL PROTECTED]] Sent: 05 June 2001 16:29 To: CF-Talk Subject: CFLOCK viability? I create a bunch of application scope variables within application.cfm - these will only be created once, and hardly ever change. In a custom tag I read those variables - and of course I need to lock that READ. Is it viable to put a CFLOCK of type READONLY around a big block of code (i.e. 170 lines). I am reading these variables a lot in this custom tag, and it would be ideal (in terms of coding effort :-) to simply lock the whole lot. Thank you Steve Development Manager Vardus Internet Solutions (SA) Tel: (+27) 21 670 9880 Fax: (+27) 21 674 4549 Email: [EMAIL PROTECTED] Website: www.vardus.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Select Boxes limiting drop down :: Please Look
try changing the formulation to something like cfquery SELECT tbl_Employee.EmployeeID, tbl_Employee.Firstname, tbl_Employee.LastName, tbl_Employee.Email, tbl_Employee.EmployeeName FROMtbl_Employee WHERE tbl_Employee.EmployeeID NOT IN ( SELECT DISTINCT EmployeeName FROMGOLF ) ORDER BY tbl_Emplyoee.LastName ASC, tbl_Employee.FirstName ASC /cfquery or cfquery SELECT tbl_Employee.EmployeeID, tbl_Employee.Firstname, tbl_Employee.LastName, tbl_Employee.Email, tbl_Employee.EmployeeName FROMtbl_Employee WHERE NOT EXISTS ( SELECT EmployeeName FROMGOLF WHERE EmployeeName = tbl_Employee.EmployeeID ) ORDER BY tbl_Employee.LastName ASC, tbl_Employee.FirstName ASC /cfquery Hope that helps CHeers Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Paul Ihrig [mailto:[EMAIL PROTECTED]] Sent: 31 May 2001 15:52 To: CF-Talk Subject: RE: Select Boxes limiting drop down :: Please Look ok. still no luck. i have tried DISTINCT have tried putting the 2 queries together i should be able to just have in my sql WHERE EmployeeName EmployeeID but it doesn't work like below: CFQUERY NAME=rs_Employees DATASOURCE=golf SELECT DISTINCT EmployeeID, FirstName, LastName, Email, EmployeeName FROM tbl_Employee, GOLF WHERE EmployeeName EmployeeID ORDER BY LastName DESC;/CFQUERY !--- The Select Box in Question --- select name=Player2 cfloop query=rs_Employees option value=cfoutput#rs_Employees.EmployeeID#/cfoutput cfif (#rs_Employees.EmployeeID# EQ #rs_Employees.EmployeeID#)SELECTED/cfifcfoutput#rs_Employees.LastName# #rs_Employees.FirstName#/cfoutput/option /cfloop /select But then i get all sorts of duplicates. -paul Whatever you can do, or dream you can, begin it. Boldness has genius, power, and magic in it. - Goethe web developer, nbbj work: [EMAIL PROTECTED] 614 241-3534 fax:614 485-5534 home: [EMAIL PROTECTED] 614 449-1681 icq: 47658358 -Original Message- From: Paul Ihrig [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 9:13 AM To: CF-Talk Subject: Select Boxes limiting drop down :: Brian Lock Ok i know this is simple but i have forgot something i want to limit the returned names on a select box to only those who have not signed up! !--- Get the id of golfer EmployeeName [which is an ID] for limiting the drop down --- cfquery name=Get_Golf datasource=golf SELECT GolfID, EmployeeName FROM tbl_Golf /cfquery !--- Find Employee Name for drop down :: But Hiding employees who have already signed up, with the where statement --- cfquery name=rs_Employees datasource=golf SELECT EmployeeID, FirstName, LastName, Email FROM tbl_Employee WHERE #Get_Golf.EmployeeName# .EmployeeID ORDER BY LastName DESC; /cfquery !--- The Select Box in Question --- select name=Player2 cfloop query=rs_Employees option value=cfoutput#rs_Employees.EmployeeID#/cfoutput cfif (#rs_Employees.EmployeeID# EQ #rs_Employees.EmployeeID#)SELECTED/cfifcfoutput#rs_Employees.LastName# #rs_Employees.FirstName#/cfoutput/option /cfloop /select Thank You! -paul ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: dhtml menu
YOu could try the DYNAPI project - it's an attempt to make a Javascript/DHTML API that will work cross-browser. Take a look at http://sourceforge.net/projects/dynapi/ -Original Message- From: Mak Wing Lok [mailto:[EMAIL PROTECTED]] Sent: 30 May 2001 09:41 To: CF-Talk Subject: dhtml menu did anyone know is there any dhtml menu CF tags that can work in IE and Netscape, i tried CF_dhtmlMenu but it only works on IE, i need a CF tag that will work on both browser. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Request vs application scope
That's the downside! Also, they are unique to each request, so memory processor usage will increase by a set amount for each page request. e.g. APPLICATION scope cflock scope=APPLICATION . cfif NOT IsDefined( APPLICATION.TestVar ) !--- Set up (say) 2KB of application variables --- /cfif /cflock - First request, you get a CPU performance hit while you set up the app. variables, and 2KB of memory is taken up by the variables. - Subsequent requests will detect the existence of APPLICATION.TestVar, and not bother setting the variables up again. - Total memory usage - 2KB for the application variables, however many page requests are made. REQUEST scope - cfset REQUEST.(whatever) = (whatever) !--- set up the same 2KB of variables in the request scope --- - Every single request will use the CPU while setting up the variables, and need the 2KB of memory for itself. - If you're in a frameset, that's (say) 3 times the CPU usage and an extra 4KB of memory per client, per hit. - Total memory usage - 2KB * number of frames * number of simultaneous users. If you're using the scope to store queries or other complex objects, or even long strings, you're going to end up with a fairly hefty performance hit. Alistair Davidson Senior Developer Rocom New Media www.rocomx.net -Original Message- From: Steve Vosloo [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 14:43 To: CF-Talk Subject: RE: Request vs application scope Brilliant! So what's the downside? The variables are not persistent across pages are they? -Original Message- From: Daniel Lancelot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 29, 2001 2:56 PM To: CF-Talk Subject: RE: Request vs application scope Yes thats right. -Original Message- From: Steve Vosloo [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 13:51 To: CF-Talk Subject: RE: Request vs application scope Thanks. Can I put any data in there that I want to use across the site? And I don't have to apply CFLOCKs do I? -Original Message- From: Daniel Lancelot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 29, 2001 2:32 PM To: CF-Talk Subject: RE: Request vs application scope Absolutely no problem... I do it regularly... -Original Message- From: Steve Vosloo [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 08:34 To: CF-Talk Subject: Request vs application scope I am using the following line of code in my application.cfm cfset request.HomeDir = http://127.0.0.1/work/ACME/may2001/website; Then elsewhere in the site I refer all links and images to: cfoutput#request.HomeDir#/cfoutput Is this OK to do? I'm trying to avoid using the application scope. Are there any known of issues with this method? Thanks. Steve Development Manager Vardus Internet Solutions (SA) Tel: (+27) 21 670 9880 Fax: (+27) 21 674 4549 Email: [EMAIL PROTECTED] Website: www.vardus.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Request vs application scope
Depends on a lot of things - complexity of variables, how often they're going to change, how many users you're expecting, how performance-critical the app is, how long it takes to obtain the values that you're going to store (e.g. if you're storing, say, a five-value array, but populating that array takes twenty queries), etc. etc. etc. Both are valid ways of doing it, I just always try to design data structures in terms of what feels right, for instance, the Home directory of a site feels more like a property of the application, rather than an individual page request, so it goes in the application scope. Besides, if you use app. scope to begin with, you've then got expansibility built in for that horrible day whwn the client says Great, that's just what I asked for, but what I actually WANT is.. -Original Message- From: Daniel Lancelot [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 15:37 To: CF-Talk Subject: RE: Request vs application scope But using request vars means the memory is released immediately the request has finished... I would agree if you are planning to store large/complex data (esp query result sets etc) then its probably best to use app scope... But would you consider it best if there are just a few simple vars (maybe 100B)? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 15:07 To: CF-Talk Subject: RE: Request vs application scope That's the downside! Also, they are unique to each request, so memory processor usage will increase by a set amount for each page request. e.g. APPLICATION scope cflock scope=APPLICATION . cfif NOT IsDefined( APPLICATION.TestVar ) !--- Set up (say) 2KB of application variables --- /cfif /cflock - First request, you get a CPU performance hit while you set up the app. variables, and 2KB of memory is taken up by the variables. - Subsequent requests will detect the existence of APPLICATION.TestVar, and not bother setting the variables up again. - Total memory usage - 2KB for the application variables, however many page requests are made. REQUEST scope - cfset REQUEST.(whatever) = (whatever) .. .. .. !--- set up the same 2KB of variables in the request scope --- - Every single request will use the CPU while setting up the variables, and need the 2KB of memory for itself. - If you're in a frameset, that's (say) 3 times the CPU usage and an extra 4KB of memory per client, per hit. - Total memory usage - 2KB * number of frames * number of simultaneous users. If you're using the scope to store queries or other complex objects, or even long strings, you're going to end up with a fairly hefty performance hit. Alistair Davidson Senior Developer Rocom New Media www.rocomx.net -Original Message- From: Steve Vosloo [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 14:43 To: CF-Talk Subject: RE: Request vs application scope Brilliant! So what's the downside? The variables are not persistent across pages are they? -Original Message- From: Daniel Lancelot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 29, 2001 2:56 PM To: CF-Talk Subject: RE: Request vs application scope Yes thats right. -Original Message- From: Steve Vosloo [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 13:51 To: CF-Talk Subject: RE: Request vs application scope Thanks. Can I put any data in there that I want to use across the site? And I don't have to apply CFLOCKs do I? -Original Message- From: Daniel Lancelot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 29, 2001 2:32 PM To: CF-Talk Subject: RE: Request vs application scope Absolutely no problem... I do it regularly... -Original Message- From: Steve Vosloo [mailto:[EMAIL PROTECTED]] Sent: 29 May 2001 08:34 To: CF-Talk Subject: Request vs application scope I am using the following line of code in my application.cfm cfset request.HomeDir = http://127.0.0.1/work/ACME/may2001/website; Then elsewhere in the site I refer all links and images to: cfoutput#request.HomeDir#/cfoutput Is this OK to do? I'm trying to avoid using the application scope. Are there any known of issues with this method? Thanks. Steve Development Manager Vardus Internet Solutions (SA) Tel: (+27) 21 670 9880 Fax: (+27) 21 674 4549 Email: [EMAIL PROTECTED] Website: www.vardus.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Downloading Files NOT in Webroot
CFCONTENT ! -Original Message- From: CF-Talk [mailto:[EMAIL PROTECTED]] Sent: 25 May 2001 13:41 To: CF-Talk Subject: Downloading Files NOT in Webroot What is the best way to allow users to download from a collection of files that are not in the webroot but rather elsewhere on the server's file system. I don't want people to be able to snoop around the directories. Thanks in advance, Rich ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Storing Complex Variables in memory
Yes, WDDX is a good way round this problem, something like - Cfwddx action=CFML2WDDX input=#yourquery# output=CLIENT.query to serialize the query into a client variable, then on subsequent pages - cfwddx action=WDDX2CFML input=#CLIENT.query# output=yourquey to deserialize it back into a CF query object, which can be used like any normal query. Hope this helps Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Nathan Nelson [mailto:[EMAIL PROTECTED]] Sent: 23 May 2001 23:09 To: CF-Talk Subject: Storing Complex Variables in memory Hello everybody, I am working on a shopping cart application and I am creating the shopping cart using a query. Right now I am storing the query as a session variable which works great. I wanted to use client variables, but it is too complex. The problem with using session variables is that this application will be on a clustered environment. Has anybody experienced this? I was thinking maybe using WDDX to put it into a client variable if that would work. I would appreciate ANY ideas on how I should handle this. Thanks in advance, Nathan Nelson ColdFusion Developer ...::[CFDynamics]::. www.cfdynamics.com [EMAIL PROTECTED] (801)621-8511 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Lock me up!
1. Depends on what you're locking! If you're locking application variables, you're probably best to go for 1 or two seconds. If you're locking access to a file, which might be locked for a lengthy writing process, go for something longer. In general, I go for one or two second timeouts with throwonerror=yes, then I can catch the error and display something meaningful to the client, rather than have them wait for ages thinking the server is down. 2. See 1. above ! 3. In this situation, I'd go for this - cfset Variables = StructNew() cftry cflock scope=APPLICATION timeout=2 throwonerror=YES cfset VARIABLES.CatName = APPLICATION.cats[url.catid].catNAME cfset VARIABLES.SubCats = APPLICATION.SubCats /cflock cfcatch type=ANY !--- Display a message --- cfexit method=EXITTEMPLATE /cfcatch /cftry cfoutput #VARIABLES.CatName# !--- Your PURE HTML --- cfloop index=i from=1 to=#ArrayLen(VARIABLES.subcats)# !--- More pure HTML --- /cfloop /cfoutput That way you only lock for the minimum amount of time/code, which is always good practice. If you cache your APPLICATION variables into a local struct, you only need to lock the bit that copies the values, and you're free to read and write to the local struct as much as you like. Hope that helps Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomX.net -Original Message- From: Michael Lugassy [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 11:49 To: CF-Talk Subject: Lock me up! 3 quick Qs about Locking: 1. how do you set the right timeout value? i.e - what are the rules and opinions on that? (longer time or shorter and efficient? 2. throwonerror? yes or no? what is recommened? assuming the program may not use the current variable? 3. please look at this: 1. #application.cats[url.catid].catNAME# 2. MORE PURE HTML 3. MORE PURE HTML 4. MORE PURE HTML 5. cfloop index=i from=1 to=#Arraylen(application.subcats)# 6. MORE PURE HTML 8. MORE PURE HTML 9. /cfloop what is better? to provide 2 quick locks around line#1 and around line#5-9 or to provide a bigger lock around lines1-9? in general, when the content inside the lock is pure html, with no use of CF/Other Process and ofcourse, no other shared variable, is it necessary to close and re-open another lock? Thanks, -=Michael ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Lock me up!
cfparam name=coffee type=black Very true, I was assuming that your Application structure would be large and very complex, therefore you'd only want to copy the keys that you would actually need for that request. And you're right, if the Struct key is itself a complex variable, you should use Duplicate. Suffering from too much dodgy curry and too little sleep last night. Alistair -Original Message- From: Michael Lugassy [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 12:24 To: CF-Talk Subject: Re: Lock me up! Great, but aren't structers considers a COMPLEX varialbe that you cannot easily copy, you forgot to add Duplicate() Thanks again! Michael Lugassy - Original Message - From: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, May 24, 2001 12:04 PM Subject: RE: Lock me up! 1. Depends on what you're locking! If you're locking application variables, you're probably best to go for 1 or two seconds. If you're locking access to a file, which might be locked for a lengthy writing process, go for something longer. In general, I go for one or two second timeouts with throwonerror=yes, then I can catch the error and display something meaningful to the client, rather than have them wait for ages thinking the server is down. 2. See 1. above ! 3. In this situation, I'd go for this - cfset Variables = StructNew() cftry cflock scope=APPLICATION timeout=2 throwonerror=YES cfset VARIABLES.CatName = APPLICATION.cats[url.catid].catNAME cfset VARIABLES.SubCats = APPLICATION.SubCats /cflock cfcatch type=ANY !--- Display a message --- cfexit method=EXITTEMPLATE /cfcatch /cftry cfoutput #VARIABLES.CatName# !--- Your PURE HTML --- cfloop index=i from=1 to=#ArrayLen(VARIABLES.subcats)# !--- More pure HTML --- /cfloop /cfoutput That way you only lock for the minimum amount of time/code, which is always good practice. If you cache your APPLICATION variables into a local struct, you only need to lock the bit that copies the values, and you're free to read and write to the local struct as much as you like. Hope that helps Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomX.net -Original Message- From: Michael Lugassy [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 11:49 To: CF-Talk Subject: Lock me up! 3 quick Qs about Locking: 1. how do you set the right timeout value? i.e - what are the rules and opinions on that? (longer time or shorter and efficient? 2. throwonerror? yes or no? what is recommened? assuming the program may not use the current variable? 3. please look at this: 1. #application.cats[url.catid].catNAME# 2. MORE PURE HTML 3. MORE PURE HTML 4. MORE PURE HTML 5. cfloop index=i from=1 to=#Arraylen(application.subcats)# 6. MORE PURE HTML 8. MORE PURE HTML 9. /cfloop what is better? to provide 2 quick locks around line#1 and around line#5-9 or to provide a bigger lock around lines1-9? in general, when the content inside the lock is pure html, with no use of CF/Other Process and ofcourse, no other shared variable, is it necessary to close and re-open another lock? Thanks, -=Michael ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: OT Javascript question
Try function test(controlnum) { var theObject = eval( document.forms[0].interest + interest ); theObject.value = theObject.value + 1; } If it's a text input that you're using, you might have to convert the values between string and integer, something like theObject.value = (theObject.value.parseInt() + 1).toString(); Haven't tested the above code, it's just off the top of my head, but it's something like that, anyway. Hope that helps Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 12:18 To: CF-Talk Subject: OT Javascript question I'm having a mind blankarghhh. I'm trying to incremtnet the value of a control in a form by one where part of the controls name is poassed in as a variable. Probably best I explain with the code snippet: function test(controlnum) { document.forms[0].interest + interest + .value = eval(document.forms[0].interest + interest + .value) + 1; } I have tested using alert and the The RHS of the equation is computed correctly. I need to let javasript know that the LHS of the equation is an object in the page rather than just a string but I can't remeber how!anyone help ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Lock me up!
Glad to help - I only properly got my mind round it about a year ago (i.e. when we got a project in that was big enough to require it) Alistair Senior Web Developer Rocom New Media www.rocomx.net PS. You think Erika spelt with a c is bad? You wouldn't believe how many variations I've had on Alistair.! -Original Message- From: Erika L. Walker [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 13:51 To: CF-Talk Subject: RE: Lock me up! That was one of the best rundowns on CFLOCK I've been privy to! Thank you for the great insight! I've always been a bit mystified when it come to setting the proper timeouts. Erika (with a *K*) One of the greatest pains to human nature is the pain of a new idea. - Walter Bagehot - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 6:04 AM To: CF-Talk Subject: RE: Lock me up! 1. Depends on what you're locking! If you're locking application variables, you're probably best to go for 1 or two seconds. If you're locking access to a file, which might be locked for a lengthy writing process, go for something longer. In general, I go for one or two second timeouts with throwonerror=yes, then I can catch the error and display something meaningful to the client, rather than have them wait for ages thinking the server is down. 2. See 1. above ! 3. In this situation, I'd go for this - cfset Variables = StructNew() cftry cflock scope=APPLICATION timeout=2 throwonerror=YES cfset VARIABLES.CatName = APPLICATION.cats[url.catid].catNAME cfset VARIABLES.SubCats = APPLICATION.SubCats /cflock cfcatch type=ANY !--- Display a message --- cfexit method=EXITTEMPLATE /cfcatch /cftry cfoutput #VARIABLES.CatName# !--- Your PURE HTML --- cfloop index=i from=1 to=#ArrayLen(VARIABLES.subcats)# !--- More pure HTML --- /cfloop /cfoutput That way you only lock for the minimum amount of time/code, which is always good practice. If you cache your APPLICATION variables into a local struct, you only need to lock the bit that copies the values, and you're free to read and write to the local struct as much as you like. Hope that helps Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomX.net -Original Message- From: Michael Lugassy [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 11:49 To: CF-Talk Subject: Lock me up! 3 quick Qs about Locking: 1. how do you set the right timeout value? i.e - what are the rules and opinions on that? (longer time or shorter and efficient? 2. throwonerror? yes or no? what is recommened? assuming the program may not use the current variable? 3. please look at this: 1. #application.cats[url.catid].catNAME# 2. MORE PURE HTML 3. MORE PURE HTML 4. MORE PURE HTML 5. cfloop index=i from=1 to=#Arraylen(application.subcats)# 6. MORE PURE HTML 8. MORE PURE HTML 9. /cfloop what is better? to provide 2 quick locks around line#1 and around line#5-9 or to provide a bigger lock around lines1-9? in general, when the content inside the lock is pure html, with no use of CF/Other Process and ofcourse, no other shared variable, is it necessary to close and re-open another lock? Thanks, -=Michael ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: OT Javascript question
parseInt() is a method of the String object, so try elt.value = elt.value.parseInt() + 1; -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 13:58 To: CF-Talk Subject: RE: OT Javascript question MopeI tried this Nick but it kept complaining at the ParseInt line saying object required. I can't see why it shouldn't work as the object definitely exists. I'm sure I've made a blindingly silly mistake so I'll persue with it after lunch :) -Original Message- From: DeVoil, Nick [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 12:32 To: CF-Talk Subject: RE: OT Javascript question Andy Does this work? function test(controlnum) { elt = document.forms[0][interest + interest]; elt.value = parseInt(elt.value) + 1; } Nick -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 12:18 PM To: CF-Talk Subject: OT Javascript question I'm having a mind blankarghhh. I'm trying to incremtnet the value of a control in a form by one where part of the controls name is poassed in as a variable. Probably best I explain with the code snippet: function test(controlnum) { document.forms[0].interest + interest + .value = eval(document.forms[0].interest + interest + .value) + 1; } I have tested using alert and the The RHS of the equation is computed correctly. I need to let javasript know that the LHS of the equation is an object in the page rather than just a string but I can't remeber how!anyone help ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Lock me up!
True. My apologies, I'm having a BAAD day -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 14:14 To: CF-Talk Subject: RE: Lock me up! The CFLOCK tag beelow should use TYPE=ReadOnly since you are only copying, not writing to the App scope. By default CFLOCK is Exclusive. Ray Camden cftry cflock scope=APPLICATION timeout=2 throwonerror=YES cfset VARIABLES.CatName = APPLICATION.cats[url.catid].catNAME cfset VARIABLES.SubCats = APPLICATION.SubCats /cflock cfcatch type=ANY !--- Display a message --- cfexit method=EXITTEMPLATE /cfcatch /cftry cfoutput #VARIABLES.CatName# !--- Your PURE HTML --- cfloop index=i from=1 to=#ArrayLen(VARIABLES.subcats)# !--- More pure HTML --- /cfloop /cfoutput ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Good resource on CF/XML integration?
Yeah, CF_SOXML is an absolutely fantastic tag, I use it all the time for all sorts of things. Well worth downloading and getting into. You should also read up on WDDX - start by looking in the CF Studio help for CFWDDX. Good luck! Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Dan Phillips [mailto:[EMAIL PROTECTED]] Sent: 23 May 2001 15:53 To: CF-Talk Subject: RE: Good resource on CF/XML integration? I did a quick search on Yahoo and found this. http://www.siteobjects.com/index.cfm?fuseAction=showProducts cf_SOXML version 1.5[r. 01/09/2001] SOXML provides ColdFusion programmers with an easy to use interface for integration of XML with CF. This custom tag is open-source (of course), free, and action based. These actions include: XML2CF (Converts a XML document into a complex CF structure) XML2DOM (Loads the XML document into a valid XML DOM object accessed via CF) XML2HTML (Displays the XML document as IE does but INLINE! very cool for debugging) CF2XML (Transforms any CF variable into a valid XML document) CF2XMLDOM (Transforms any CF variable into a valid XML DOM object accessible with CFML) Transform (Transforms any XML document based on a specified XSL document) I'm sure forta.com and CFDJ would have some info too. Hope that helps! Dan Phillips www.cfxhosting.com -Original Message- From: river [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 10:22 AM To: CF-Talk Subject: Good resource on CF/XML integration? Is there any good resources on CF/XML integration? Any good web sites?? Thanks ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Tertiary Domain Creation
Depends on what server the machine is running. If it's IIS, then look at the admin sample VB scripts -Original Message- From: Karl Simanonok [mailto:[EMAIL PROTECTED]] Sent: 22 May 2001 11:01 To: CF-Talk Subject: Tertiary Domain Creation Some of you who subscribe to Shanje.com's inexpensive web hosting may have noticed how the Web Control Panel allows you to create tertiary domains on domains that you have installed there (for example the tertiary domain karl.simanonok.com is one of the domains under simanonok.com). One nice thing about tertiary domains is that they don't cost anything extra, but they also can make cleaner URLs (karl.simanonok.com is much better than simanonok.com/karl in my opinion). Does anyone know how to create tertiary domains in code so that their generation can be done remotely as in Shanje.com's web control panel? Please don't bother suggesting that I ask the owner of Shanje.com, I've already tried that and he doesn't want to share that knowledge. I'm thinking it might require some kind of Java crapplet or maybe a COM object that ColdFusion can control. Or maybe they reside in the registry and CFREGISTRY is used? Has anyone done this before? Regards, Karl Simanonok Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session Solution.
You could do it with javascript and DHTML, something like this - cfset TimeoutSecs = 30 div id=Countdown You will timeout in #TimeoutSecs# seconds /div script language=javascript var Timer = #TimeoutSecs# window.setTimeout( tick();, 1000 ); function tick() { Timer = Timer - 1; if( Timer 0 ) { document.all['Countdown'].innerHTML = You will timeout in + Timer + seconds; window.setTimeout( tick();, 1000 ); } else { alert( You have timed out! ); self.location=timeout.cfm; } } /script It would need a bit of modification to work in Nutscrape, but I hope that helps! Cheers, Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: 22 May 2001 15:59 To: CF-Talk Subject: Session Solution. I have been skirting the issue here for a while I am simply trying to notify a user when their session will timeout. I would like it to count down. Like a dialog box that says you will timeout in 5 minutes and counts down? Any ideas? Thanks, Neil ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Slightly OT: UK Extended Fusebox Training
Hi, Sorry for the OT post, but I just wondered if any of you guys (and gals) were going to Hal Helms' Extended Fusebox Training Course in the UK on 16th July? Please mail me off-list if you are! Cheers Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF and custom stylesheets
Hi Scott We did exactly the same thing - the trick seemed to be that the style.cfm page has to have a CFCONTENT tag in it, otherwise the browser just doesn't get it. By the way, we found that it killed performance by an incredible amount, so we switched to doing it by writing the stylesheet to a .css file (with CFFILE) once the selections had been made, and just putting link rel=StyleSheet TYPE=text/css HREF=#CSSFilename#.css into subsequent pages. This lowered CPU DB load by almost a third - i'd HIGHLY recommend you try it like this. Cheers Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Scott Weikert [mailto:[EMAIL PROTECTED]] Sent: 10 May 2001 18:27 To: CF-Talk Subject: CF and custom stylesheets Hey gang... I've kinda got this working, but would prefer to improve it a bit. I'm trying to modify an existing app, that uses stylesheets, to allow for customization of the colorsets... so that User #1 can choose the blue set, User #2 the green set, etc. Each set has a hex color code for each of the styles used, stored in the DB... so basically, user logs in, tap the DB for the colorcodes, make session vars out of each, reference said vars when executing the style code, voila - purdy colors. :) I can do this easily enough if I just include the style page (as a .cfm file) - but what I'd *really* like to do is be able to link to the stylesheet page, so that the styles themselves don't show up in the source, i.e. LINK REL=StyleSheet TYPE=text/css HREF=style.cfm I've had some hassles trying to link the page like this... it doesn't seem to properly execute the CF code within. Anyone out there tried to do this same thing, and succeeded? Input would be most welcome. Thanks in advance- --Scott ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL Server 7 book(s) recommendation
I'd recommend Inside Microsoft SQL Server 7.0 by Ron Soukup and Karen Delaney (Microsoft Press). It's fifty something quid, but it goes into a lot of detail on just about every aspect of SQL 7, T-SQL included. It's a right rivetin' read..almost as good as Fly Fishing by J.R. Hartley. Cheers Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] Sent: 15 May 2001 13:28 To: CF-Talk Subject: OT: SQL Server 7 book(s) recommendation My SQL is a bit ropey and I want a decent book or two to plough through. I'm going to be working with SQL Server 7, so it would be great if anyone can recommend a book that covers both standard SQL (not necessarily from ground zero) and T-SQL as well. If not, are there two separate books you can recommend? I've bought SAMS Teach Yourself SQL in 21 days and am not all that impressed... Any thoughts? Thanks -- Aidan Whitehall [EMAIL PROTECTED] Netshopperuk Telephone +44 (01744) 648650 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Duplicate CFTOKEN and CFID . . .
The other problem we've had with this is that users often email links to each other. If CFID CFTOKEN are in the URL, you then get multiple users with the same CFID CFTOKEN. -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 07:08 To: CF-Talk Subject: Re: Duplicate CFTOKEN and CFID . . . Any sort of firewall or proxy server or something in place? If they are in different parts of the country, I would assume not. But, I know that any sort of firewall / proxy server / whatever.. it may see all three users as coming from the same place, and therefore.. same CFID / CFTOKEN. At 09:48 PM 05/07/2001 -0400, you wrote: We work on a site that uses client variables to store username and pass info (Remember My Pass type of feature). We have received complaints from three people using this site that the username/pass info was already filled in, so I wrote a quick little routine that sends me their CFTOKEN and ID. All three are the same. They are not accessing from the same computer - in fact they are in different parts of the country. Any thoughts? TIA Shawnea Carter ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Pause
You could have the server page that creates the text files - 1) use CFCONTENT to automatically deliver the text files, 2) make it POST the files back with CFHTTP 3) CFOUTPUT the contents of the text file into a HTML comment, then parse the file content out of CFHTTP.Filecontent All of the above are strategies I've used before. Hope this helps Alistair Davidson Senior Web Developer Rocom New Media www.rocomx.net -Original Message- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 07:04 To: CF-Talk Subject: Pause I have one page that goes to a server with form fields and makes it create a text file. I then want to put a pause after it does the get and then kick off the rest of the code to do the get for the text files. Does anyone have any idea on this one? Joshua Tipton ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFX_HTTP thread safe?
If you wanted to make doubly sure, you can always put a named CFLOCK around any use of it - that'll force it to only run one instance at once. -Original Message- From: Dylan Bromby [mailto:[EMAIL PROTECTED]] Sent: 02 May 2001 18:06 To: CF-Talk Subject: RE: CFX_HTTP thread safe? i've used it for quite some time without any trouble. -Original Message- From: Admin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 9:07 AM To: CF-Talk Subject: CFX_HTTP thread safe? I would just like to ask if CFX_HTTP is thread safe? I will be useing it for online processing of credit cards payments so I need to make it work as faultless as possible. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Cf_objectdump
I use it all the time - say if your array is called MyArray, you have to make sure you use cf_objectdump object=#MyArray# NOT cf_objectdump object=MyArray otherwise cf_objectdump will just dump MyArray, which is a string. hope that helps Alistair Davidson Senior Web Developer Rocom New media www.rocomx.net -Original Message- From: Darren Adams [mailto:[EMAIL PROTECTED]] Sent: 30 April 2001 14:17 To: CF-Talk Subject: Cf_objectdump Does anyone have experience with this custom tag ? I am using this to dump an array onto the screen but all it does is display the name of the file. Darren Adams Web Developer Marketing Department Systems Union Office: 01252 55 6220 Mobile: 07714 817 038 Email: [EMAIL PROTECTED] ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: It's not big and it's not clever...
Although (maybe I'm missing something here, but...) what on earth is rude about aunty -Original Message- From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] Sent: 24 April 2001 09:08 To: CF-Talk Subject: RE: It's not big and it's not clever... If you use the library below however, you may encounter words like bass that have ass in them... Then look for an exact match, not a partial... -- Aidan Whitehall [EMAIL PROTECTED] Netshopperuk Telephone +44 (01744) 648650 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists