Re: SUMMARY: Request Scope Follow up Locking Questions
Terry Hogan wrote: My last question was: 4. What about locking? I've read that Request Variables don't need to be locked. Is that true? Why not? Dave Watts Replied They don't need to be locked, because they're not persistent memory variables. I would rephrase that as: They don't need to be locked because they're not shared between threads and therefore have no chance of being accessed simultaneously by 2 or more threads. Jochem ~~ 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: Inserting single quotes into SQL Server... Rarrararrr!!!
USE CFQUERYPARAM Pascal Peters Macromedia Certified Instructor Certified ColdFusion (5.0) Advanced Developer Certified Web Developer LR Technologies, Belgium Tel +32 2 639 68 70 Fax +32 2 639 68 99 Email [EMAIL PROTECTED] Web www.lrt.be From: Kevin Langevin [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Inserting single quotes into SQL Server... Date: Mon, 12 Nov 2001 16:33:21 -0500 Hi all- I've beaten this problem before, but even looking at code that seems to work fine from previous projects, I can't see what I'm doing wrong. I want to insert a string into a record in a SQL Server 2000 DB. The string contains a customer's name. If the customer's name contains an apostrophe, the insert dies. It works fine in another app, but I can't see what I'm doing differently. I'm not escaping anything or doing anything special, from what I can see. Anyone have any standard ways of inserting strings into SQL which may or may not contain single quotes? Kevin Langevin Web Guy In Charge UsWebGuys 954-327-5780 ~~ 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: Am I a crackhead: CFContent Weirdness
Linking o your download page like this works... Lets assume the download page is called dload.cfm dload.cfm/#DownloadFile#?file=#DownloadFile# dload.cfm needs to contain this line, seems to work fine on it's own. - cfcontent file=#request.filepath##url.file# deletefile=No type=unknown - That's an old fix for NT4 SP6 from the allaire web site about 18 months ago, it still seems to work fine for me on win2k with cf5. Cheers, Craig -Original Message- From: Eric J Hoffman [mailto:[EMAIL PROTECTED]] Sent: 12 November 2001 21:49 To: CF-Talk Subject: RE: Am I a crackhead: CFContent Weirdness CFHEADER NAME=Content-Disposition VALUE=inline; filename=#form.tempfilename# cfcontent type=application/unknown file=D:\blah\clientapps\marcon\archives\#form.tempfilename# It still comes up with the name of the calling template file instead of the file name! Am I still off? Eric J Hoffman Home of Vikings fans Worldwide! http://www.purplepride.org -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 11, 2001 3:53 PM To: CF-Talk Subject: RE: Am I a crackhead: CFContent Weirdness Well, even when I cfcontent a normal file name like temp.txt, it is naming the file the calling template's file name rather than temp.txt in the save as dialog. Very weird?? Not really - that's how CFCONTENT works. For examples of how to work around this, look here: http://www.figleaf.com/demo/mimetest/ Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~ 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
StructClear(session) again...
Hi, Recently someone said that StructClear(session) was a bad way to remove session variables. Why? If I effectively want to remove an entire session (this is ti be used in a logout template), wouldn't StructClear(Session) be the way to do it? Regards Tage Widsell Webmaster Propellerhead Software ~~ 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
OT: JavaScript to navigate around data entry input forms
I need to write some JavaScript to enable users to navigate around a form that's 5 text inputs wide by up to about 30 inputs height by pressing the arrow keys, as opposed to tabbing through them. Each form input is named differently using a regular naming convention. Does anyone have any pointers on how to go about writing something like this? Thanks -- Aidan Whitehall [EMAIL PROTECTED] Macromedia ColdFusion Developer Fairbanks Environmental +44 (0)1695 51775 ~~ 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: JavaScript to navigate around data entry input forms
I need to write some JavaScript to enable users to navigate around a form that's 5 text inputs wide by up to about 30 inputs height by pressing the arrow keys, as opposed to tabbing through them. Each form input is named differently using a regular naming convention. Does anyone have any pointers on how to go about writing something like this? The first thing raised is Cross Browser Compatibility - if you want it, then it'll increase your work no end Anyways, without starting on code, the general principal is to capture all events and check for the arrow key presses, then you have to find out where the cursor currently is (you can't just assume) and move it in the correct direction Two words for you: good luck! Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: JavaScript to navigate around data entry input forms
The first thing raised is Cross Browser Compatibility - if you want it, then it'll increase your work no end No, that's OK. IE4+ is required to use this site. Anyways, without starting on code, the general principal is to capture all events and check for the arrow key presses, then you have to find out where the cursor currently is (you can't just assume) and move it in the correct direction Thanks. I think I'm starting to get a handle on it. I've used onKeyDown to return the name of the form input. I guess I also need to return the key that was pressed to determine what form input to put focus on. The thing that I'm not sure about is how to do that (think it might related to something called which) and then what to do if the form field to which a key press should take the cursor doesn't exist (ie when the cursor is on the far right hand side and you press the right arrow). Any pointers to sites dealing with this topic would be gratefully received. -- 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: Request Scope Questions
Well, the 'issue' (to put it mildly) that we experienced appeared to be one of memory corruption. We got inconsistent, very vague error messages, sometimes referencing variable names from another application on the same server. The problems were very persistent, so if you haven't been having problems already, you might be safe. Unfortunately the patch is only for CF Enterprise (we have Professional), so I resorted to copying all individual structure keys to Request scope, and locking Session scoped queries before looping throught them. Marianne Daye -Original Message- From: gyrus [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 10:32 AM To: CF-Talk Subject: Re: Request Scope Questions Bare in mind that CF 4.5 had a um, 'issue' with Duplicate. You can download a hotfix for it though. What was the issue?! I've got several sites live that are relying on Duplicate for passing session vars to request scope, and I'm not sure if the hosts have all the latest patches. - Gyrus ~~ 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: Inserting single quotes into SQL Server... Rarrararrr!!!
Hi Ken, As other people pointed out that Cf will escape the single quote in a simple variable. What I have had is when you use evaluate() function to evaluate a variable which contains a singlequote then CF will fail to escape it. I solved this problem by after the evaluation replacing the singlequote with two siglequotes (not a double,that's what the SQL statement wants to see). e.g. '#replaceNoCase(trim(evaluate(attributes.#i#_#toWho#)),','',ALL) #'. But the way you used to assign the result of the evaluation to a simple variable will also work here. Regards, Sima -Original Message- From: Mookie Bear [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 4:54 PM To: CF-Talk Subject: Re: Inserting single quotes into SQL Server... Rarrararrr!!! For some reason this always works with me!! ok, i assume that customer's name is in form variable, so create a new variable and set it to that form variable, and use that new variable u created in the SQL code. this works, promise! if anyone knows why, i'd like to know! hehehe Rarrararrr!!! From: Kevin Langevin [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Inserting single quotes into SQL Server... Date: Mon, 12 Nov 2001 16:33:21 -0500 Hi all- I've beaten this problem before, but even looking at code that seems to work fine from previous projects, I can't see what I'm doing wrong. I want to insert a string into a record in a SQL Server 2000 DB. The string contains a customer's name. If the customer's name contains an apostrophe, the insert dies. It works fine in another app, but I can't see what I'm doing differently. I'm not escaping anything or doing anything special, from what I can see. Anyone have any standard ways of inserting strings into SQL which may or may not contain single quotes? Kevin Langevin Web Guy In Charge UsWebGuys 954-327-5780 -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 4:29 PM To: CF-Talk Subject: CFCookie and the old switcharoo - help! Hey everyone, Anyone that read my recent posts CFCOOKIE and the old switcheroo. I am still looking for any other suggestion before I revert to using sessions instead of cookies. The basic problem is that I have a multiple user environment, a class room of students, each log in to take the test: Page1: cfform action=repreverification.cfm method=post cfoutput p br table width=75% border=0 tr td width=50%Welcome Back #cookie.repname#:/td td width=50% input type=hidden name=RepName value='#cookie.repname#' /td /tr tr td width=50% align=rightID:/td td width=50% CFinput type=text name=RepID maxlength=5 message=Your ID must be 5 digits in length size=20 required=Yes b(First 5 digits of SSN.)/b /td /tr /table If you are not #cookie.repname# a href=./logon.cfm?track=yesClick here/a pbr input type=submit name=Submit value=Submit /cfoutput /cfform That is submitted through the form action to repverification which builds the cookies. cfoutput cfparam name=value1 default= cfparam name=counter default= cfparam name=increment default=0 cfparam name=cookvalue default= cfset counter = '1' cfset cookvalue = '#form.repname#' /cfoutput !--- removes single and double quotes from entry --- cfloop condition=counter lt len(FORM.repname)+1 CFOUTPUT cfset value1='#counter#' cfif '#mid(form.repname,value1,1)#' EQ CHR(34) OR '#mid(form.repname,value1,1)#' EQ CHR(39) cfset cookvalue='#removechars(cookvalue,value1-increment,1)#' cfset increment = '#increment#' + 1 /cfif /CFOUTPUT Cfset Counter = counter + 1 /cfloop !--- cookies --- cfif isnumeric(form.repid) is 'yes' and len(form.repid) EQ 5 cfapplication name=PerfTracksessionmanagement=Yes cfcookie name=repname expires=NOW cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW cfcookie name=repid expires=NOW cflock name=repvars timeout=60 throwontimeout=Yes type=EXCLUSIVE CFCOOKIE NAME=CFID VALUE=#SESSION.CFID# CFCOOKIE NAME=CFTOKEN VALUE=#SESSION.CFTOKEN# CFcookie NAME=repname VALUE=#cookvalue# EXPIRES=2 CFcookie NAME=repid VALUE=#form.repid# EXPIRES=2 /cflock meta http-equiv=refresh content=.1; URL=nhrepmenu.cfm cfabort cfelse The information you have provided as your ID is not numeric or does not contain 5 digits, please click back and enter the first 5 digits of your social security number. /cfif Lastly the repmenu is pulled up. cfquery name=blah datasource=ncc blockfactor=50 select #variables.mastertableansw#.fldname, #variables.mastertableansw#.fldid, #variables.mastertableansw#.testnumber, max(#variables.mastertableansw#.questionnumber) as maxquest, max(#variables.mastertable#.questnum) as maxq from #variables.mastertableansw#, #variables.mastertable# where fldname = '#cookie.repname#' and fldid = '#cookie.repid#'and #variables.mastertableansw#.testnumber=
RE: StructClear(session) again...
Tage, If you run a the StructClear() against the session scope you will lose ALL the session keys, including the session ID, CFID and CFTOKEN. Once these are gone, it is impossible to then associate a user with a session. Good luck, Beau -Original Message- From: Tage Widsell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 5:03 AM To: CF-Talk Subject: StructClear(session) again... Hi, Recently someone said that StructClear(session) was a bad way to remove session variables. Why? If I effectively want to remove an entire session (this is ti be used in a logout template), wouldn't StructClear(Session) be the way to do it? Regards Tage Widsell Webmaster Propellerhead Software ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
Hi Terry, It's a very nice summary, however, I have some thoughts after reading. A couple of notes here: if you do this, use something like cfset request.var=Duplicate(session.var) to transfer the variable. If you don't use Duplicate() - correct me if I'm wrong someone! - then request.var just becomes a 'pointer' to session.var, and session.var is still actually read when you refer later to request.var (rendering the whole business kind of redundant!). Duplicate() - which is only available in CF4.5+ - makes request.var a 'deep' copy of session.var, and then request.var technically has nothing to do with session.var except having the same value. And you said: This gets to what I was really looking for because I want to do some things with structures and session variables and how best to work with them... I think to use request.var this way you can only read the variable. Since the duplicate() function creates a new structure which copies the value of the seesion.var, any changes you made to it will not affect the actual session var(That's why you want a copy not a point). And the request.var will go out of scope after the current request, at next request you still make a copy to the actual session.var! This is just my thought if I am wrong please correct it. Thanks Sima -Original Message- From: Terry Hogan [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 12:46 AM To: CF-Talk Subject: SUMMARY: Request Scope Follow up Locking Questions I want to thank everyone (particularily gyrus and Dave Watts) who responded to my questions regarding Request Scope. I had spent the better part of 2 days studying my 4 CF Reference Books plus checking many online sources and still didn't really understand the concept but you guys cleared it up real quick. I'm sure others are interested in this so I thought I'd summarize what I learned. Below I have cutpasted some snippets from the thread and added a few of my own comments. 1. What exactly is the Request Scope? On 11/11/2001 at 3:59 AM gyrus wrote: The request scope lasts for the duration of each request. If you define request.var, every file (includes, custom tags, whatever) that's processed from then on in the course of that HTTP request has access to request.var. It seems kind of stupid now, but I couldn't understand why they were called Request variables. D! It's because they persist and are available to all templates and custom tags in a single HTTP request! On 11/11/2001 at 2:15 PM Peter Tilbrook wrote: I may be wrong but once set (eg: in the application.cfm file) if you do not provide a scope (eg: Application., Session., Client., they become variables in the REQUEST scope. You can then access them anywhere in a template without using a scope, eg: H, but how does that fit with custom tags?.. On 11/11/2001 at 5:07 PM Dave Watts wrote: It's identical to the local Variables scope in all ways except one: the Request scope is available both to a page and to any custom tags called by that page. It was added to make custom tag programming easier. If, for example, you wrote a recursive custom tag, it might have to write to the Caller scope to return its results, requiring a bit of tap-dancing around. Using the Request scope, you can have a variable that can be accessed easily from any custom tag, no matter how deep the recursion goes. Ok, that makes sense. And Peter wasn't quite correct. If a scope is not defined when a variable is set they are in the Variables Scope, not the Request Scope--the difference being that Request Variables are accessible (both Read Write, I presume) in Custom Tags as well as the Calling template. 2. How are Request Variables similar or different from Session or Application Variables? On 11/11/2001 at 5:07 PM Dave Watts wrote: They're not persistent memory variables, as are Session, Application or Server variables. Goes back to my new found understanding that Request variables only last for a particular HTTP Request. 3. When should/shouldn't Request Variables be used? On 11/11/2001 at 5:07 PM Dave Watts wrote: You can use them in place of the local Variables scope any time you like, really. The only time it wouldn't be appropriate to use them this way is when you want to create a variable that isn't accessible from both a calling page and its custom tags. They're very useful as constants, for example. You might have a bunch of variables which aren't going to change over the lifespan of the application, things like DSN names and file paths, for example. The Request scope is good for these since you may want to access those global variables from within custom tags. Of course, when you use the Request or Variables scopes for constants within Application.cfm, the variables will be created and destroyed again for each page request. There's a cost to that, but it's usually less than the cost of managing persistent memory variables within the
RE: Request Scope Questions
Which is not surprising. The issue was that Duplicate was not creating a true copy under certain situations. Instead it was creating pointers. This then would cause problems just like using app/session/server vars w/o locking, as Marianne describes below. I don't remember the exact situation where Duplicate failed. I believe it was different from where StructCopy failed. If I remember right it was something pretty deep - like a struct having an array that had structs itself. Eitherway, if you are running 4.5, just get the hot fix. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Daye, Marianne [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 7:45 AM To: CF-Talk Subject: RE: Request Scope Questions Well, the 'issue' (to put it mildly) that we experienced appeared to be one of memory corruption. We got inconsistent, very vague error messages, sometimes referencing variable names from another application on the same server. The problems were very persistent, so if you haven't been having problems already, you might be safe. Unfortunately the patch is only for CF Enterprise (we have Professional), so I resorted to copying all individual structure keys to Request scope, and locking Session scoped queries before looping throught them. Marianne Daye -Original Message- From: gyrus [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 10:32 AM To: CF-Talk Subject: Re: Request Scope Questions Bare in mind that CF 4.5 had a um, 'issue' with Duplicate. You can download a hotfix for it though. What was the issue?! I've got several sites live that are relying on Duplicate for passing session vars to request scope, and I'm not sure if the hosts have all the latest patches. - Gyrus ~~ 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: Trying to access information I just inserted in Access
Bruce and Steven, I hate to quibble, but there are some issues with this psuedo-code that I think should be pointed out. 1) The use of the application.dsn variable: if you use this variable, you will need to wrap the entire query with a CFLOCK inorder to lock the application scope for readonly access. I would suggest you duplicate the application scope into the request scope and access request.dsn, which eliminates the need to CFLOCK. See the recent summary on this issue for more information. 2) CFTRANSACTION: The first two queries need to be wrapped with a CFTRANSACTION tag. By doing to you ensure that CF is getting the correct ID since no other writes to the table can occur within the CFTRANSACTION block. Without it, there is the possbility (however remote) that another user wrote to the database between these two queries and when you extract the Max ID, you are getting that record and not the one you really want. Good luck, Beau -Original Message- From: Bruce Sorge [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 5:12 PM To: CF-Talk Subject: Re: Trying to access information I just inserted in Access I usually do this (Presuming that you are using AutoNumbering). cfquery datasource=#Application.DSN# INSERT INTO. /cfquery cfquery datasource=#Application.DSN# Name=qSomeName Select MAX(Some_ID) AS LastID From Sometable /cfquery cfquery datasource=#Application.DSN# Name=qWhatever Select Something From Somewhere Where ID = #qSomeName.ID# /cfquery -- Original Message -- From: Steven Lancaster [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Mon, 12 Nov 2001 15:51:27 -0600 I have a form which inserts data into an access database. Once that data is inserted I need to access the ID for that data so that I can send a URL in an email for them to click on so that the information can be updated by somebody else. I am running into the problem once I insert it tells me it does not understand #id#. I do a query right after the insertion so that it can pull that info, but how do I cross reference? Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.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: Request Scope Questions
I don't remember the exact situation where Duplicate failed. I believe it was different from where StructCopy failed. If I remember right it was something pretty deep - like a struct having an array that had structs itself. Eitherway, if you are running 4.5, just get the hot fix. We had it when we had created queries in shared scope vars (session/application etc) and then tried to duplicate them. Blew up every time, taking the server with it. -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: 13 November 2001 13:53 To: CF-Talk Subject: RE: Request Scope Questions Which is not surprising. The issue was that Duplicate was not creating a true copy under certain situations. Instead it was creating pointers. This then would cause problems just like using app/session/server vars w/o locking, as Marianne describes below. I don't remember the exact situation where Duplicate failed. I believe it was different from where StructCopy failed. If I remember right it was something pretty deep - like a struct having an array that had structs itself. Eitherway, if you are running 4.5, just get the hot fix. == = Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Daye, Marianne [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 7:45 AM To: CF-Talk Subject: RE: Request Scope Questions Well, the 'issue' (to put it mildly) that we experienced appeared to be one of memory corruption. We got inconsistent, very vague error messages, sometimes referencing variable names from another application on the same server. The problems were very persistent, so if you haven't been having problems already, you might be safe. Unfortunately the patch is only for CF Enterprise (we have Professional), so I resorted to copying all individual structure keys to Request scope, and locking Session scoped queries before looping throught them. Marianne Daye -Original Message- From: gyrus [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 10:32 AM To: CF-Talk Subject: Re: Request Scope Questions Bare in mind that CF 4.5 had a um, 'issue' with Duplicate. You can download a hotfix for it though. What was the issue?! I've got several sites live that are relying on Duplicate for passing session vars to request scope, and I'm not sure if the hosts have all the latest patches. - Gyrus ~~ 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: Trying to access information I just inserted in Access
Thanks to everyone for your help. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Beau Harbin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 7:50 AM To: CF-Talk Subject: RE: Trying to access information I just inserted in Access Bruce and Steven, I hate to quibble, but there are some issues with this psuedo-code that I think should be pointed out. 1) The use of the application.dsn variable: if you use this variable, you will need to wrap the entire query with a CFLOCK inorder to lock the application scope for readonly access. I would suggest you duplicate the application scope into the request scope and access request.dsn, which eliminates the need to CFLOCK. See the recent summary on this issue for more information. 2) CFTRANSACTION: The first two queries need to be wrapped with a CFTRANSACTION tag. By doing to you ensure that CF is getting the correct ID since no other writes to the table can occur within the CFTRANSACTION block. Without it, there is the possbility (however remote) that another user wrote to the database between these two queries and when you extract the Max ID, you are getting that record and not the one you really want. Good luck, Beau -Original Message- From: Bruce Sorge [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 5:12 PM To: CF-Talk Subject: Re: Trying to access information I just inserted in Access I usually do this (Presuming that you are using AutoNumbering). cfquery datasource=#Application.DSN# INSERT INTO. /cfquery cfquery datasource=#Application.DSN# Name=qSomeName Select MAX(Some_ID) AS LastID From Sometable /cfquery cfquery datasource=#Application.DSN# Name=qWhatever Select Something From Somewhere Where ID = #qSomeName.ID# /cfquery -- Original Message -- From: Steven Lancaster [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Mon, 12 Nov 2001 15:51:27 -0600 I have a form which inserts data into an access database. Once that data is inserted I need to access the ID for that data so that I can send a URL in an email for them to click on so that the information can be updated by somebody else. I am running into the problem once I insert it tells me it does not understand #id#. I do a query right after the insertion so that it can pull that info, but how do I cross reference? Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com ~~ 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
Are forms really structures?
Hi I've been doing some testing with the form scope and have been getting some inconsistent results on cf 4.5.1. AFAIK the form scope is available as a structure: If i have a form with the following field: form name=myform action=test3.cfm method=post input type=text name=name value=kola input type=Submit /form and on the action page create an additional form field, Then loop over the field names with the follwing code, only the real form field submmited by the form is displayed. cfset form.fake = hello cfloop list=#fieldnames# index=current brcfoutput#current#/cfoutput /cfloop hr If I then loop over the form as a structure: cfloop collection=#form# item=current brcfoutput#current#/cfoutput /cfloop The real form field(form.name), plus the one created on the action page (form.fake) and the fieldname variable (form.fieldname) are all displayed. So the question is, is this a feature or a bug? Thanks Kola Kola Oyedeji Web developer Macromedia Certified Advanced ColdFusion 5 Developer http://www.Alexandermark.com (+44)020-8429-7300 ~~ 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: Are forms really structures?
If I then loop over the form as a structure: cfloop collection=#form# item=current brcfoutput#current#/cfoutput /cfloop The real form field(form.name), plus the one created on the action page (form.fake) and the fieldname variable (form.fieldname) are all displayed. So the question is, is this a feature or a bug? This is a feature... really. It represents the fact that you can add junk to the form scope. Normally you take the form data as is, but if you want to, you can add and remove fields. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda ~~ 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: Are forms really structures?
oi Kola!! I didn't think forms were a structure in versions LT 4.5 ? I did this to convert them. cfscript //cf_frmtoStruct struct=myStruct frmStruct = StructNew(); aryfrmNames = ListToArray(form.fieldnames); for(i=1; i LT ListLen(form.fieldnames)+1; i=i+1){ StructInsert(frmStruct,#ListGetAt(form.fieldnames,i)#,evaluate(form. ListGetAt(form.fieldnames,i))); } SetVariable(caller.#attributes.struct#,frmStruct); /cfscript -- Critter, MMCP Certified ColdFusion Developer Crit[s2k] - CF_ChannelOP Network=Efnet Channel=ColdFusion - Tuesday, November 13, 2001, 9:16:49 AM, you wrote: KO Hi KO I've been doing some testing with the form scope and have been getting some KO inconsistent KO results on cf 4.5.1. KO AFAIK the form scope is available as a structure: KO If i have a form with the following field: KO form name=myform action=test3.cfm method=post KO input type=text name=name value=kola KO input type=Submit KO /form KO and on the action page create an additional form field, KO Then loop over the field names with the follwing code, only the real form KO field submmited by the form is displayed. KO cfset form.fake = hello KO cfloop list=#fieldnames# index=current KO brcfoutput#current#/cfoutput KO /cfloop KO hr KO If I then loop over the form as a structure: KO cfloop collection=#form# item=current KO brcfoutput#current#/cfoutput KO /cfloop KO The real form field(form.name), plus the one created on the action page KO (form.fake) KO and the fieldname variable (form.fieldname) are all KO displayed. KO So the question is, is this a feature or a bug? KO Thanks KO Kola KO Kola Oyedeji KO Web developer KO Macromedia Certified Advanced ColdFusion 5 Developer KO http://www.Alexandermark.com KO (+44)020-8429-7300 KO ~~ 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]: Are forms really structures?
oi Critz!! Bah, nevermind mei'm half asleep still! -- Critter, MMCP Certified ColdFusion Developer Crit[s2k] - CF_ChannelOP Network=Efnet Channel=ColdFusion - Tuesday, November 13, 2001, 9:23:09 AM, you wrote: C oi Kola!! C I didn't think forms were a structure in versions LT 4.5 ? C I did this to convert them. C cfscript C //cf_frmtoStruct struct=myStruct C frmStruct = StructNew(); C aryfrmNames = ListToArray(form.fieldnames); C for(i=1; i LT ListLen(form.fieldnames)+1; i=i+1){ C StructInsert(frmStruct,#ListGetAt(form.fieldnames,i)#,evaluate(form. ListGetAt(form.fieldnames,i))); C } C SetVariable(caller.#attributes.struct#,frmStruct); C /cfscript ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
that's why you just whack the local copy of the variable back into the session scope (locking it, of course) at the end of processing. ie, CFLOCK READONLY request.localstruct = Duplicate(SESSION.mystruct) /CFLOCK .. processing on request.localstruct... CFLOCK EXCLUSIVE SESSION.mystruct = Duplicate(request.localstruct) /CFLOCK christopher olive, cto, vp of web development cresco technologies, inc 410.825.0383 http://www.crescotech.com -Original Message- From: Sima Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 8:50 AM To: CF-Talk Subject: RE: SUMMARY: Request Scope Follow up Locking Questions Hi Terry, It's a very nice summary, however, I have some thoughts after reading. A couple of notes here: if you do this, use something like cfset request.var=Duplicate(session.var) to transfer the variable. If you don't use Duplicate() - correct me if I'm wrong someone! - then request.var just becomes a 'pointer' to session.var, and session.var is still actually read when you refer later to request.var (rendering the whole business kind of redundant!). Duplicate() - which is only available in CF4.5+ - makes request.var a 'deep' copy of session.var, and then request.var technically has nothing to do with session.var except having the same value. And you said: This gets to what I was really looking for because I want to do some things with structures and session variables and how best to work with them... I think to use request.var this way you can only read the variable. Since the duplicate() function creates a new structure which copies the value of the seesion.var, any changes you made to it will not affect the actual session var(That's why you want a copy not a point). And the request.var will go out of scope after the current request, at next request you still make a copy to the actual session.var! This is just my thought if I am wrong please correct it. Thanks Sima -Original Message- From: Terry Hogan [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 12:46 AM To: CF-Talk Subject: SUMMARY: Request Scope Follow up Locking Questions I want to thank everyone (particularily gyrus and Dave Watts) who responded to my questions regarding Request Scope. I had spent the better part of 2 days studying my 4 CF Reference Books plus checking many online sources and still didn't really understand the concept but you guys cleared it up real quick. I'm sure others are interested in this so I thought I'd summarize what I learned. Below I have cutpasted some snippets from the thread and added a few of my own comments. 1. What exactly is the Request Scope? On 11/11/2001 at 3:59 AM gyrus wrote: The request scope lasts for the duration of each request. If you define request.var, every file (includes, custom tags, whatever) that's processed from then on in the course of that HTTP request has access to request.var. It seems kind of stupid now, but I couldn't understand why they were called Request variables. D! It's because they persist and are available to all templates and custom tags in a single HTTP request! On 11/11/2001 at 2:15 PM Peter Tilbrook wrote: I may be wrong but once set (eg: in the application.cfm file) if you do not provide a scope (eg: Application., Session., Client., they become variables in the REQUEST scope. You can then access them anywhere in a template without using a scope, eg: H, but how does that fit with custom tags?.. On 11/11/2001 at 5:07 PM Dave Watts wrote: It's identical to the local Variables scope in all ways except one: the Request scope is available both to a page and to any custom tags called by that page. It was added to make custom tag programming easier. If, for example, you wrote a recursive custom tag, it might have to write to the Caller scope to return its results, requiring a bit of tap-dancing around. Using the Request scope, you can have a variable that can be accessed easily from any custom tag, no matter how deep the recursion goes. Ok, that makes sense. And Peter wasn't quite correct. If a scope is not defined when a variable is set they are in the Variables Scope, not the Request Scope--the difference being that Request Variables are accessible (both Read Write, I presume) in Custom Tags as well as the Calling template. 2. How are Request Variables similar or different from Session or Application Variables? On 11/11/2001 at 5:07 PM Dave Watts wrote: They're not persistent memory variables, as are Session, Application or Server variables. Goes back to my new found understanding that Request variables only last for a particular HTTP Request. 3. When should/shouldn't Request Variables be used? On 11/11/2001 at 5:07 PM Dave Watts wrote: You can use them in place of the local Variables scope any time you like, really. The only time it wouldn't be appropriate to use them this way is when you want to create a variable that isn't accessible from both a
Jscript totalling with dynamic CF Fields..
Hello all, Umm..I'm in a bit of a bind. I have several rows of fields that are dynamically named like Reg_#CurrentDate# or VAC_#CurrentDate#. At the end of each row, I need a Total of the numbers entered into the fields to show dynamically, as the user enters values into each field. How in the nine hells am I going to do that? I will have to somehow pass the name of the field (which is dynamically generated) to some Javascript (or Vbscript it doesn't matter right now), and then do the calculation with the code attached to the onBlur() event of each field. But I have no idea where to even start with writing code like this. -Gel ~~ 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: Using cfheader and cfcontent to open file in UltraEdit
Date: Tue, 13 Nov 2001 09:49:46 -0500 To: ColdFusion User Group From: phumes1 [EMAIL PROTECTED] Subject: Re: Using cfheader and cfcontent to open file in UltraEdit Hi, I'm using cfheader and cfcontent to open a file in Ultraedit on my PC (client) from a link on the webserver. Opening the file is working great except for one thing. I want the proper path of the directory/filename to appear in my editor. RIght now I get the following path [D:\Documents and Settins\user.name\Local Settings\Temporary Internet Files\Content.IE5\SD6ZC1QR\filename[1].dat] How can I get it to read [D:\directory\subdirectory\filename.dat] Here is my code: cfset FileName = ListLast(url.filename, \) cfset DirPath = Left(url.filename, Evaluate(Len(url.filename) - len(FileName) - 1)) cfoutput cfheader name=Content-Disposition value=inline; filename=#FileName# cfcontent type=application/dat file=d:/directory/subdirectory/#FileName# deletefile=No /cfoutput ~~ 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: Jscript totalling with dynamic CF Fields..
Loop through the elements of the form and add the value of any field whose name begins with Reg_. You may also want to put in some validation that all the fields are numeric and do not contain any non-numeric characters. function sumValues() { var TheSum = 0; for( var i=0; idocument.FormName.elements.length; i++) { if( document.FormName.elements[i].name.search(/^Reg_/) != -1 ) { // put numeric validation here? TheSum += document.FormName.elements[i].value; } } } HTH, Nate -Original Message- From: Angel Stewart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 9:40 AM To: CF-Talk Subject: Jscript totalling with dynamic CF Fields.. Hello all, Umm..I'm in a bit of a bind. I have several rows of fields that are dynamically named like Reg_#CurrentDate# or VAC_#CurrentDate#. At the end of each row, I need a Total of the numbers entered into the fields to show dynamically, as the user enters values into each field. How in the nine hells am I going to do that? I will have to somehow pass the name of the field (which is dynamically generated) to some Javascript (or Vbscript it doesn't matter right now), and then do the calculation with the code attached to the onBlur() event of each field. But I have no idea where to even start with writing code like this. -Gel ~~ 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: Using cfheader and cfcontent to open file in UltraEdit
phumes1 wrote: I'm using cfheader and cfcontent to open a file in Ultraedit on my PC (client) from a link on the webserver. Opening the file is working great except for one thing. I want the proper path of the directory/filename to appear in my editor. RIght now I get the following path [D:\Documents and Settins\user.name\Local Settings\Temporary Internet Files\Content.IE5\SD6ZC1QR\filename[1].dat] How can I get it to read [D:\directory\subdirectory\filename.dat] Not. RFC 2616 explicitly forbids the interpretation of path info by a browser because it could be a security risk. So your browser will not pass this info on to UltraEdit. Jochem ~~ 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: Are forms really structures?
It's not a bug really and I am surprised it hasn't been picked up before. The thing is that CF sees everything the same to some degree, however in this case the form scope maybe appearing to be a variable if written by CF so FORM.name Would indicate a structure to CF, but only if you got CF to set a form scope variable and not if it was posted. -Original Message- From: Kola Oyedeji [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 14 November 2001 1:17 AM To: CF-Talk Subject: Are forms really structures? Hi I've been doing some testing with the form scope and have been getting some inconsistent results on cf 4.5.1. AFAIK the form scope is available as a structure: If i have a form with the following field: form name=myform action=test3.cfm method=post input type=text name=name value=kola input type=Submit /form and on the action page create an additional form field, Then loop over the field names with the follwing code, only the real form field submmited by the form is displayed. cfset form.fake = hello cfloop list=#fieldnames# index=current brcfoutput#current#/cfoutput /cfloop hr If I then loop over the form as a structure: cfloop collection=#form# item=current brcfoutput#current#/cfoutput /cfloop The real form field(form.name), plus the one created on the action page (form.fake) and the fieldname variable (form.fieldname) are all displayed. So the question is, is this a feature or a bug? Thanks Kola Kola Oyedeji Web developer Macromedia Certified Advanced ColdFusion 5 Developer http://www.Alexandermark.com (+44)020-8429-7300 ~~ 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
adding and subtracting dates
I would like to show a link being active if and only if the file has been put in the directory. A simple solution is if directory updated today's date do x else do y I thought this would be simple -- but I can't get it to work : Here's some of what I've tried: CFDIRECTORY ACTION=list DIRECTORY=c:\xxx\xxx\xxx NAME=dvp FILTER=*.pdf cfset lastModified=#dvp.dateLastModified# cfset year=#Mid(lastModified,7,4)# cfset month=#Left(lastModified,2)# cfset day=#Mid(lastModified,4,2)# cfset hour=#Mid(lastModified,12,2)# cfset minute=#Mid(lastModified,15,2)# cfset second=#Mid(lastModified,18,2)# cfset DateToday = now() cfset yearToday=#Mid(DateToday,6,4)# cfset monthToday=#Mid(DateToday,11,2)# cfset dayToday=#Mid(DateToday,14,2)# CFOUTPUT cfif #CreateDateTime('#year#','#month#','#day#','#hour#','#minute#','#second#')# lt #CreateDate('#yearToday#','#monthToday#','#dayToday#')# do x cfelse do y /cfif /CFOUTPUT Gilbert Midonnet BrokerTec USA, LLC (201) 209-7843 This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
use something like cfset request.var=Duplicate(session.var) to transfer the variable. I think to use request.var this way you can only read the variable. Absolutely - maybe I should have said. I generally transfer session variables into the request scope in application.cfm so that I don't have to worry about locking every time I want to read a session variable (90% of my use of session variables). Of course, if I need to update a session variable, I use a lock for writing to the session variable itself, and the updated value gets read back into the request scope next time round (you can update the corresponding request variable immediately if the value might be needed within the same request, naturally). - Gyrus ~~ 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: Help with test
if it's random each iteration would be mutually exclusive so your result would be different every time On Mon, 12 Nov 2001, Douglas L. Brown wrote: I want to test how many iterations I can put randRange(,) through before it comes up with a duplicate number, can someone help me with script to do so? CF_SIGNATURE NAME=Douglas L. Brown EMAIL=[EMAIL PROTECTED] PHONE=714.538.6611 WEB=http://www.carnivorepc.com; ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
But surely that means that CF is using double the memory for every request... Memory to store the session details and memory to store the session details.. Whats wrong with setting CFAdmin to automatically lock reads... That way any time you read a shared var ie IsDefined and DSN's etc its already locked... Then all you have to do is lock the writes.. -Original Message- From: Gyrus [mailto:[EMAIL PROTECTED]] Sent: 13 November 2001 15:09 To: CF-Talk Subject: Re: SUMMARY: Request Scope Follow up Locking Questions use something like cfset request.var=Duplicate(session.var) to transfer the variable. I think to use request.var this way you can only read the variable. Absolutely - maybe I should have said. I generally transfer session variables into the request scope in application.cfm so that I don't have to worry about locking every time I want to read a session variable (90% of my use of session variables). Of course, if I need to update a session variable, I use a lock for writing to the session variable itself, and the updated value gets read back into the request scope next time round (you can update the corresponding request variable immediately if the value might be needed within the same request, naturally). - Gyrus ~~ 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: adding and subtracting dates
Try cfif NOT DateDiff(d, dateLastModified, Now()) - Original Message - From: Gilbert Midonnet [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:04 AM Subject: adding and subtracting dates I would like to show a link being active if and only if the file has been put in the directory. A simple solution is if directory updated today's date do x else do y I thought this would be simple -- but I can't get it to work : Here's some of what I've tried: CFDIRECTORY ACTION=list DIRECTORY=c:\xxx\xxx\xxx NAME=dvp FILTER=*.pdf cfset lastModified=#dvp.dateLastModified# cfset year=#Mid(lastModified,7,4)# cfset month=#Left(lastModified,2)# cfset day=#Mid(lastModified,4,2)# cfset hour=#Mid(lastModified,12,2)# cfset minute=#Mid(lastModified,15,2)# cfset second=#Mid(lastModified,18,2)# cfset DateToday = now() cfset yearToday=#Mid(DateToday,6,4)# cfset monthToday=#Mid(DateToday,11,2)# cfset dayToday=#Mid(DateToday,14,2)# CFOUTPUT cfif #CreateDateTime('#year#','#month#','#day#','#hour#','#minute#','#second#')# lt #CreateDate('#yearToday#','#monthToday#','#dayToday#')# do x cfelse do y /cfif /CFOUTPUT Gilbert Midonnet BrokerTec USA, LLC (201) 209-7843 -- -- This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. ~~ 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: Jscript totalling with dynamic CF Fields..
In addition to Nate's solution you could also use the this keyword onblur to do what you want, and you dont have to think about the names. script var total = 0; function addVal(number) { //adds passed value to running total var total += number; //sets hidden field to current running value document.formname.total.value = number; } /script input type=text name=#dynamic# onblur=addVal(this.value); input type=hidden name=total value=0 I just typed this up, so there might be a type somewhere. You would probably also want to do check if the passed value is numeric before adding it too. function isNumeric(string, ignoreWhiteSpace) { if (string.search) { if ((ignoreWhiteSpace string.search(/[^\d\s]/) != -1) || (!ignoreWhiteSpace string.search(/\D/) != -1)) return false; } return true; } jon - Original Message - From: Angel Stewart [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:39 AM Subject: Jscript totalling with dynamic CF Fields.. Hello all, Umm..I'm in a bit of a bind. I have several rows of fields that are dynamically named like Reg_#CurrentDate# or VAC_#CurrentDate#. At the end of each row, I need a Total of the numbers entered into the fields to show dynamically, as the user enters values into each field. How in the nine hells am I going to do that? I will have to somehow pass the name of the field (which is dynamically generated) to some Javascript (or Vbscript it doesn't matter right now), and then do the calculation with the code attached to the onBlur() event of each field. But I have no idea where to even start with writing code like this. -Gel ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
Because it doesn't work. In CF 4.5x, anyway, auto read locking doesn't catch all uses of shared-scope variables; I don't have a list of what it does and doesn't catch, but generally it misses things like Cfquery name=variables.myqyery datasource=#application.dsn# and other non-cfset situations. -Original Message- From: Mike Townend [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:16 AM To: CF-Talk Subject: RE: SUMMARY: Request Scope Follow up Locking Questions But surely that means that CF is using double the memory for every request... Memory to store the session details and memory to store the session details.. Whats wrong with setting CFAdmin to automatically lock reads... That way any time you read a shared var ie IsDefined and DSN's etc its already locked... Then all you have to do is lock the writes.. -Original Message- From: Gyrus [mailto:[EMAIL PROTECTED]] Sent: 13 November 2001 15:09 To: CF-Talk Subject: Re: SUMMARY: Request Scope Follow up Locking Questions use something like cfset request.var=Duplicate(session.var) to transfer the variable. I think to use request.var this way you can only read the variable. Absolutely - maybe I should have said. I generally transfer session variables into the request scope in application.cfm so that I don't have to worry about locking every time I want to read a session variable (90% of my use of session variables). Of course, if I need to update a session variable, I use a lock for writing to the session variable itself, and the updated value gets read back into the request scope next time round (you can update the corresponding request variable immediately if the value might be needed within the same request, naturally). - Gyrus ~~ 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
adding buttons to ezedit?
Anyone out there ev er aded buttons to ezedit? I am having no trouble getting them to appear just added aTD but I cannot get the onlcik= to refresh the page and change a url variable? anyone ever done anythign similar??? Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [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: Help with test
Right, it would kind of be like the lottery. I just wanted to know what the odds was of a dup in a million iterations. DB - Original Message - From: Alex [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 6:44 AM Subject: Re: Help with test if it's random each iteration would be mutually exclusive so your result would be different every time On Mon, 12 Nov 2001, Douglas L. Brown wrote: I want to test how many iterations I can put randRange(,) through before it comes up with a duplicate number, can someone help me with script to do so? CF_SIGNATURE NAME=Douglas L. Brown EMAIL=[EMAIL PROTECTED] PHONE=714.538.6611 WEB=http://www.carnivorepc.com; ~~ 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: StructClear(session) again...
structClear(session.loggedIn,username) would be a better alternative. Db - Original Message - From: Beau Harbin [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 5:00 AM Subject: RE: StructClear(session) again... Tage, If you run a the StructClear() against the session scope you will lose ALL the session keys, including the session ID, CFID and CFTOKEN. Once these are gone, it is impossible to then associate a user with a session. Good luck, Beau -Original Message- From: Tage Widsell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 5:03 AM To: CF-Talk Subject: StructClear(session) again... Hi, Recently someone said that StructClear(session) was a bad way to remove session variables. Why? If I effectively want to remove an entire session (this is ti be used in a logout template), wouldn't StructClear(Session) be the way to do it? Regards Tage Widsell Webmaster Propellerhead Software ~~ 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
OT: More JavaScript shenanigans
OK, I give up. Given a date/time object in JavaScript, how the heck to you add one day to it? (ie what's the equivalent of the ColdFusion DateAdd() function?) Danny Goodman doesn't seem to know, either ;-) http://developer.netscape.com/viewsource/goodman_dateobject.html 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: OT: More JavaScript shenanigans
OK, I give up. Given a date/time object in JavaScript, how the heck to you add one day to it? (ie what's the equivalent of the ColdFusion DateAdd() function?) Never mind... think I got it http://www.merlyn.demon.co.uk/js-dates.htm -- 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
mime attchments with cfmail
Is it possible to send more than one attchment with cfmail? I tried to list the attachments seperated by a comma and by a semi colon, but got errors. Tim ~~ 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
cfSchedule is not doing anything
Hi there!! I'm not getting any results from my cfshedule here. The schedule at a certain time will compile a report from date A to date B and write to an XML or Excel document. The client is still deciding on that one. So for the time being it is just sending a test email. The template runs OK when tested, i.e. the email is sent, but will never run through the admin when Run directly or set to run at a given time. I checked the archives AND faq: Bruce, Rodney had the exact same problem but the thread just stopped, the coversataion was never completed. I have also emailed Bruce off list. FAQ didn't cover this problem. My basic code. CFIF isDefined(FORM.createCustomisedSchedule) !--- // schedule custom tag |--- CFSET second=00 CFSET NEWStartDate=createDate(FORM.displayYear, FORM.displayMonth, FORM.displayDay) CFSET NEWStartTime=createTime(FORM.hour, FORM.minute, second) CF_createSchedule scheduleOption=#FORM.scheduleOption# schName=#FORM.scheduleName# schInterval=#FORM.scheduleInterval# startDate=#NEWStartDate# startTime=#NEWStartTime# custInterval=#FORM.dailyInterval# newSchDir=#FORM.newSchDirectory# vehidList=#FORM.SelectedItems# /CFIF tag template CFIF ATTRIBUTES.scheduleOption EQ New !--- CFSET intVal=(60*60) --- CFIF ATTRIBUTES.custInterval GT 1 CFSET intVal=(ATTRIBUTES.custInterval*24) CFSET intVal=(intVal*60) CFSET intVal=(intVal*60) /CFIF CFIF ATTRIBUTES.schInterval EQ Customise CFSCHEDULE action=UPDATE task=#ATTRIBUTES.schName# operation=HTTPRequest startDate=#dateFormat(ATTRIBUTES.startDate, 'DD/MM/')# startTime=#timeFormat(ATTRIBUTES.startTime, 'hh:mm:ss')# interval=#intVal# url=#request.secureScheduleRoot#EXECUTE/RUNSchedule.cfm /CFIF /CFIF Is there something I am not doing maybe? Thanks in advance anyone. ~~ 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: mime attchments with cfmail
from the CFstudio help CFMAIL FROM=[EMAIL PROTECTED] To=[EMAIL PROTECTED] Subject=See Important Attachments and Reply CFMAILPARAM NAME=Reply-To VALUE=[EMAIL PROTECTED] Please read the text file and view the new logo, and let us know what you think. CFMAILPARAM FILE=c:\work\readme.txt CFMAILPARAM FILE=c:\work\logo.gif /CFMAIL -Original Message- From: Tim [mailto:[EMAIL PROTECTED]] Sent: dinsdag 13 november 2001 17:03 To: CF-Talk Subject: mime attchments with cfmail Is it possible to send more than one attchment with cfmail? I tried to list the attachments seperated by a comma and by a semi colon, but got errors. Tim ~~ 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: mime attchments with cfmail
Just include multiple CFMAILPARAM tags CFMAILPARAM File=#DocsLocation##FileName1# CFMAILPARAM File=#DocsLocation##FileName2# CFMAILPARAM File=#DocsLocation##FileName3# -Original Message- From: Tim [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 11:03 AM To: CF-Talk Subject: mime attchments with cfmail Is it possible to send more than one attchment with cfmail? I tried to list the attachments seperated by a comma and by a semi colon, but got errors. Tim ~~ 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: cfSchedule is not doing anything
grasping at straws but does administrator use dates in dd/mm/ format or is it provincial ;) and take only mm/dd/ format? - Original Message - From: John McCosker [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:03 AM Subject: cfSchedule is not doing anything Hi there!! I'm not getting any results from my cfshedule here. The schedule at a certain time will compile a report from date A to date B and write to an XML or Excel document. The client is still deciding on that one. So for the time being it is just sending a test email. The template runs OK when tested, i.e. the email is sent, but will never run through the admin when Run directly or set to run at a given time. I checked the archives AND faq: Bruce, Rodney had the exact same problem but the thread just stopped, the coversataion was never completed. I have also emailed Bruce off list. FAQ didn't cover this problem. My basic code. CFIF isDefined(FORM.createCustomisedSchedule) !--- // schedule custom tag |--- CFSET second=00 CFSET NEWStartDate=createDate(FORM.displayYear, FORM.displayMonth, FORM.displayDay) CFSET NEWStartTime=createTime(FORM.hour, FORM.minute, second) CF_createSchedule scheduleOption=#FORM.scheduleOption# schName=#FORM.scheduleName# schInterval=#FORM.scheduleInterval# startDate=#NEWStartDate# startTime=#NEWStartTime# custInterval=#FORM.dailyInterval# newSchDir=#FORM.newSchDirectory# vehidList=#FORM.SelectedItems# /CFIF tag template CFIF ATTRIBUTES.scheduleOption EQ New !--- CFSET intVal=(60*60) --- CFIF ATTRIBUTES.custInterval GT 1 CFSET intVal=(ATTRIBUTES.custInterval*24) CFSET intVal=(intVal*60) CFSET intVal=(intVal*60) /CFIF CFIF ATTRIBUTES.schInterval EQ Customise CFSCHEDULE action=UPDATE task=#ATTRIBUTES.schName# operation=HTTPRequest startDate=#dateFormat(ATTRIBUTES.startDate, 'DD/MM/')# startTime=#timeFormat(ATTRIBUTES.startTime, 'hh:mm:ss')# interval=#intVal# url=#request.secureScheduleRoot#EXECUTE/RUNSchedule.cfm /CFIF /CFIF Is there something I am not doing maybe? Thanks in advance anyone. ~~ 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: cfSchedule is not doing anything
Do I have to have the coldfusion executive running for CFShedule to work on an NT server or Just when using LocalHost. Ahh just as I am writing a reply to myself, incoming mail. grasping at straws but does administrator use dates in dd/mm/ format or is it provincial ;) and take only mm/dd/ format? Administrator seems fine when recieiving it in dd/mm/ but sets it to mm/dd/ anyway. -Original Message- From: John McCosker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 4:03 PM To: CF-Talk Subject: cfSchedule is not doing anything Hi there!! I'm not getting any results from my cfshedule here. The schedule at a certain time will compile a report from date A to date B and write to an XML or Excel document. The client is still deciding on that one. So for the time being it is just sending a test email. The template runs OK when tested, i.e. the email is sent, but will never run through the admin when Run directly or set to run at a given time. I checked the archives AND faq: Bruce, Rodney had the exact same problem but the thread just stopped, the coversataion was never completed. I have also emailed Bruce off list. FAQ didn't cover this problem. My basic code. CFIF isDefined(FORM.createCustomisedSchedule) !--- // schedule custom tag |--- CFSET second=00 CFSET NEWStartDate=createDate(FORM.displayYear, FORM.displayMonth, FORM.displayDay) CFSET NEWStartTime=createTime(FORM.hour, FORM.minute, second) CF_createSchedule scheduleOption=#FORM.scheduleOption# schName=#FORM.scheduleName# schInterval=#FORM.scheduleInterval# startDate=#NEWStartDate# startTime=#NEWStartTime# custInterval=#FORM.dailyInterval# newSchDir=#FORM.newSchDirectory# vehidList=#FORM.SelectedItems# /CFIF tag template CFIF ATTRIBUTES.scheduleOption EQ New !--- CFSET intVal=(60*60) --- CFIF ATTRIBUTES.custInterval GT 1 CFSET intVal=(ATTRIBUTES.custInterval*24) CFSET intVal=(intVal*60) CFSET intVal=(intVal*60) /CFIF CFIF ATTRIBUTES.schInterval EQ Customise CFSCHEDULE action=UPDATE task=#ATTRIBUTES.schName# operation=HTTPRequest startDate=#dateFormat(ATTRIBUTES.startDate, 'DD/MM/')# startTime=#timeFormat(ATTRIBUTES.startTime, 'hh:mm:ss')# interval=#intVal# url=#request.secureScheduleRoot#EXECUTE/RUNSchedule.cfm /CFIF /CFIF Is there something I am not doing maybe? Thanks in advance anyone. ~~ 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
Radio Button
Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.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: Radio Button
yuphere goes.. cfparam name=radMyRadioButton default=Value From Database input type=radio name=radMyRadioButton value=1 cfif radMyRadioButton eq 1checked/cfif input type=radio name=radMyRadioButton value=2 cfif radMyRadioButton eq 2checked/cfif Ta Da! ;-) Bryan Stevenson VP Director of E-Commerce Development Electric Edge Systems Group Inc. p. 250.920.8830 e. [EMAIL PROTECTED] - Allaire Alliance Partner www.allaire.com - Original Message - From: Steven Lancaster [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 8:28 AM Subject: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.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
ActiveMail
Anybody out there in the great ColdFusion hell that is cfmail use ActiveMail from CFDev.com? (http://www.cfdev.com/jmail/) I talked to them a few weeks ago and it seems like a much needed replacement for cfmail. I'm soliciting responses for how it's working for those of y'all that are using it; how many emails can it handle? Do you loop around the tag or do you use ValueList()?, etc. (How many values could ValueList() support in the first place?) I know they are supposed to release an update sometime real soon, if they haven't done it already, that's supposed to handle a query input and a few other things... Tyler Silcox email | [EMAIL PROTECTED] website | www.gslsolutions.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: OT : More JavaScript shenanigans
for all your how do I do that cf function in JavaScript? ... I once built the CFMLjsLibrary, all cold fusion functions, re-built in JS. you can download it from : http://devex.allaire.com/developer/gallery/info.cfm?ID=CA347557-2830-11D4-AA 9700508B94F380method=Full Shlomy -Original Message- From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:52 AM To: CF-Talk Subject: OT: More JavaScript shenanigans OK, I give up. Given a date/time object in JavaScript, how the heck to you add one day to it? (ie what's the equivalent of the ColdFusion DateAdd() function?) Danny Goodman doesn't seem to know, either ;-) http://developer.netscape.com/viewsource/goodman_dateobject.html Thanks -- Aidan Whitehall [EMAIL PROTECTED] Macromedia ColdFusion Developer Fairbanks Environmental +44 (0)1695 51775 ~~ 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: Radio Button
Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: JavaScript to navigate around data entry input forms
At 11:50 AM 11/13/2001 +, you wrote: The first thing raised is Cross Browser Compatibility - if you want it, then it'll increase your work no end No, that's OK. IE4+ is required to use this site. Good, then now all you have to do is make is cross compatible with 4 versions :) ~~ 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: Radio Button
what does iif and de stand for? I understand what it is doing, I just don't understand the syntax. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:48 AM To: CF-Talk Subject: RE: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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
Form problem
I have a shipping form for an e-commerce site and have a delima. The form is populated from a query that grabs the last shipping address that the customer used. I have a dropdown on the page now that gives the user the option to choose from the list of addresses they have used in the past, and have an option for NEW. I need to be able to clear the fields in the form when they select new from the dropdown. Will it be best to populate the dropdown from a structure and have the new element be blank? Doug ~~ 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: Radio Button
I belieive IIF stands for Inline IF and DE stands for Delay(ed) Evaluation HTH Mike -Original Message- From: Steven Lancaster [mailto:[EMAIL PROTECTED]] Sent: 13 November 2001 16:50 To: CF-Talk Subject: RE: Radio Button what does iif and de stand for? I understand what it is doing, I just don't understand the syntax. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:48 AM To: CF-Talk Subject: RE: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: Radio Button
Delayed Evaluation.. It's a function. Lee -Original Message- From: Steven Lancaster [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 8:50 AM To: CF-Talk Subject: RE: Radio Button what does iif and de stand for? I understand what it is doing, I just don't understand the syntax. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:48 AM To: CF-Talk Subject: RE: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: Radio Button
I looked it up (sorry). I tried to use the iif but I can't get it to work. I will send a snippet and you can see what I am trying to do. cfloop query=check input type=radio name=status value=Not Assigned Yet #IIf(status is Not Assigned Yet, de(checked) ,de ())# font face=Arial, Helvetica, sans-serif color=#FFbNot Assigned Yet/b/font/td /tr tr td input type=radio name=status value=Work in Progress #IIf(status is Work in Progress, de(checked) ,de ())# bfont face=Arial, Helvetica, sans-serifWork In Progress/font/b/td /tr tr td input type=radio name=status value=Completed or Closed #IIf(status is Completed or Closed, de(checked) ,de ())# font face=Arial, Helvetica, sans-serif color=#009900bCompleted / Closed/b/font/td /tr /cfloop Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Lee Fuller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 11:03 AM To: CF-Talk Subject: RE: Radio Button Delayed Evaluation.. It's a function. Lee -Original Message- From: Steven Lancaster [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 8:50 AM To: CF-Talk Subject: RE: Radio Button what does iif and de stand for? I understand what it is doing, I just don't understand the syntax. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:48 AM To: CF-Talk Subject: RE: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: Radio Button
iif is a boolean evaluation for expressions that are dynamic. iff true(doThis..) false(doThis..) if elseif and else is for general conditional logic. JMC -Original Message- From: Steven Lancaster [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 4:50 PM To: CF-Talk Subject: RE: Radio Button what does iif and de stand for? I understand what it is doing, I just don't understand the syntax. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:48 AM To: CF-Talk Subject: RE: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: Are forms really structures?
Kola Oyedeji wrote: AFAIK the form scope is available as a structure: If i have a form with the following field: form name=myform action=test3.cfm method=post input type=text name=name value=kola input type=Submit /form and on the action page create an additional form field, Then loop over the field names with the follwing code, only the real form field submmited by the form is displayed. cfset form.fake = hello cfloop list=#fieldnames# index=current brcfoutput#current#/cfoutput /cfloop You are not looping over the form scope here, you are looping over the form variable form.fieldnames. The presence of this variable in the debug output makes me believe that this list is actually created by the browser and submitted together with all the other formfields. Which would also explain why this variable is not updated when adding fields to the form scope/structure serverside. If I then loop over the form as a structure: So the question is, is this a feature or a bug? Feature. But maybe one that requires a note at livedocs.allaire.com Jochem ~~ 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: Radio Button
Hey Steven, If the form will be posted and do some sort of server-side error checking (and re-shown with errors if any are found) then my method (back a few posts) is the one to go with. This is because my method initializes the var for the radio button which then passes it's new or unchanged value into the error checking process (when form is posted). If errors are found the form can be re-displayed with the users input and a list of errors. By using the looping/iif/de method the radio buttons will always revert to the value in the database as opposed to the value selected by the user after the initial display of the form. my 2 cents ;-) Bryan Stevenson VP Director of E-Commerce Development Electric Edge Systems Group Inc. p. 250.920.8830 e. [EMAIL PROTECTED] - Allaire Alliance Partner www.allaire.com - Original Message - From: Steven Lancaster [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:02 AM Subject: RE: Radio Button I looked it up (sorry). I tried to use the iif but I can't get it to work. I will send a snippet and you can see what I am trying to do. cfloop query=check input type=radio name=status value=Not Assigned Yet #IIf(status is Not Assigned Yet, de(checked) ,de ())# font face=Arial, Helvetica, sans-serif color=#FFbNot Assigned Yet/b/font/td /tr tr td input type=radio name=status value=Work in Progress #IIf(status is Work in Progress, de(checked) ,de ())# bfont face=Arial, Helvetica, sans-serifWork In Progress/font/b/td /tr tr td input type=radio name=status value=Completed or Closed #IIf(status is Completed or Closed, de(checked) ,de ())# font face=Arial, Helvetica, sans-serif color=#009900bCompleted / Closed/b/font/td /tr /cfloop Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Lee Fuller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 11:03 AM To: CF-Talk Subject: RE: Radio Button Delayed Evaluation.. It's a function. Lee -Original Message- From: Steven Lancaster [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 8:50 AM To: CF-Talk Subject: RE: Radio Button what does iif and de stand for? I understand what it is doing, I just don't understand the syntax. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:48 AM To: CF-Talk Subject: RE: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: JavaScript to navigate around data entry input forms
A bit OT,(just an intellectual exercise for me...) but I'm curious as to why?? you are using arrow keys to navigate the fields? What is the user to do when they need to arrow key around inside a text box ??? Though I can understand moving around a big grid with Tab/ShiftTab can be a drag. At 11:50 AM 11/13/01 -, you wrote: The first thing raised is Cross Browser Compatibility - if you want it, then it'll increase your work no end No, that's OK. IE4+ is required to use this site. Anyways, without starting on code, the general principal is to capture all events and check for the arrow key presses, then you have to find out where the cursor currently is (you can't just assume) and move it in the correct direction Thanks. I think I'm starting to get a handle on it. I've used onKeyDown to return the name of the form input. I guess I also need to return the key that was pressed to determine what form input to put focus on. The thing that I'm not sure about is how to do that (think it might related to something called which) and then what to do if the form field to which a key press should take the cursor doesn't exist (ie when the cursor is on the far right hand side and you press the right arrow). Any pointers to sites dealing with this topic would be gratefully received. -- 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
Having major problems with session variables
Hi, Session Variables seem to be a hot topic at the minute, so I was wondering if anyone could shed some light or give some advice on the problem below. We have a multiple user web based application that is all user-profile based. User A is the site administrator with full access to the site. User B is a member of company 1, and he can only see his companies data on the site. User C is a member of company 2, and he can only see his companies data on the site. What we are experiencing is a swapping of user profiles. User B is logging in as himself and is happily navigation through the site, gaining access to their own data, until they start to see information which is supposed to only be relevant to User C. User A is sometimes logging in, and is getting restricted access to the site because he has somehow inherited the profile of another user (who has a lower access privilege). Somehow the profiles are being swapped while the users are in the system. We are using session variables for the profiling, and access privileges, but the somehow are getting mixed up. When we are calling session variables in a query on any individual page we have declared local variables corresponding to these at the top of the page, and referenced these throughout the rest of the page, see below, cflock timeout=10 type=READONLY scope=SESSION cfset Variables.chris = session.chris /cflock . cfquery name=queryName datasource=#mydsn# Select * from table where user_id = #Variables.chris# /cfquery We are also using StructClear() to kill the session variables when the user logs out. I do not know what else to do, as the problem is still persisting. Has anyone experienced this, or can they offer any advice or direction. Cheers, ~~ 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: Radio Button
This is what I am using for this, hope I'm not far off, I did not see the original post CFPARAM NAME=status DEFAULT=status1 html head titleUntitled/title /head body form name=test CFIF isDefined(status) CFIF status EQ status1 CFSET status_value = CHECKED /CFIF /CFIF CFOUTPUT Status 1input type=radio name=status VALUE=status1 #status_value#nbsp; Status 2input type=radio name=status VALUE=status2 /CFOUTPUT /form /body /html - Original Message - From: Bryan Stevenson [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:21 AM Subject: Re: Radio Button Hey Steven, If the form will be posted and do some sort of server-side error checking (and re-shown with errors if any are found) then my method (back a few posts) is the one to go with. This is because my method initializes the var for the radio button which then passes it's new or unchanged value into the error checking process (when form is posted). If errors are found the form can be re-displayed with the users input and a list of errors. By using the looping/iif/de method the radio buttons will always revert to the value in the database as opposed to the value selected by the user after the initial display of the form. my 2 cents ;-) Bryan Stevenson VP Director of E-Commerce Development Electric Edge Systems Group Inc. p. 250.920.8830 e. [EMAIL PROTECTED] - Allaire Alliance Partner www.allaire.com - Original Message - From: Steven Lancaster [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:02 AM Subject: RE: Radio Button I looked it up (sorry). I tried to use the iif but I can't get it to work. I will send a snippet and you can see what I am trying to do. cfloop query=check input type=radio name=status value=Not Assigned Yet #IIf(status is Not Assigned Yet, de(checked) ,de ())# font face=Arial, Helvetica, sans-serif color=#FFbNot Assigned Yet/b/font/td /tr tr td input type=radio name=status value=Work in Progress #IIf(status is Work in Progress, de(checked) ,de ())# bfont face=Arial, Helvetica, sans-serifWork In Progress/font/b/td /tr tr td input type=radio name=status value=Completed or Closed #IIf(status is Completed or Closed, de(checked) ,de ())# font face=Arial, Helvetica, sans-serif color=#009900bCompleted / Closed/b/font/td /tr /cfloop Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Lee Fuller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 11:03 AM To: CF-Talk Subject: RE: Radio Button Delayed Evaluation.. It's a function. Lee -Original Message- From: Steven Lancaster [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 8:50 AM To: CF-Talk Subject: RE: Radio Button what does iif and de stand for? I understand what it is doing, I just don't understand the syntax. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:48 AM To: CF-Talk Subject: RE: Radio Button Is there any way to take a value out of a database and see if it matches a value on a radio button and if it does to check that radio button? I have 3 radio buttons. I need to look at the values and see if they match whichever one matches I need to have that radio button checked. I know this probably and idiotic question (sorry). CFIF or IIF() cfloop query=myQuery input type=radio name=myName value=1 #iif(myField is 1,de(checked),de())# 1br /cfloop You get the idea Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ:
Re: Form problem
I'm assuming that when they select a different address from the dropdown you submit to the page again and query out the values for that address. So why not just do the query for something that will never return a record when they select new? Since CF will always populate a query that returns no records with null values you could just keep the code the way it is and let the fields be set as nulls. jon - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 12:08 PM Subject: Form problem I have a shipping form for an e-commerce site and have a delima. The form is populated from a query that grabs the last shipping address that the customer used. I have a dropdown on the page now that gives the user the option to choose from the list of addresses they have used in the past, and have an option for NEW. I need to be able to clear the fields in the form when they select new from the dropdown. Will it be best to populate the dropdown from a structure and have the new element be blank? Doug ~~ 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: Radio Button
input type=radio name=status value=Not Assigned Yet #IIf(status is Not Assigned Yet, de(checked) ,de ())# If you don't put quotes around the Not Assigned Yet, CF will assume it has to evaluate it input type=radio name=status value=Not Assigned Yet #IIf(status is Not Assigned Yet, de(checked) ,de ())# Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: Having major problems with session variables
Well, as far as the sessions getting mixed up I do not see how this is happening unless they are sending links to eachother with their session vars in the url. One thing to note, is that with structClear() you will be killing all session vars and not just the user that logged out. I would say that using temp variables would be the best way to go IE CFAPPLICATION NAME=SecureApp CLIENTMANAGEMENT=Yes SESSIONMANAGEMENT=Yes SETCLIENTCOOKIES=Yes SESSIONTIMEOUT=#createTimeSpan(0, 0, 60, 0)# !--- Lock all session variables to assure security in the use of sessions //--- CFLOCK scope=session type=exclusive timeout=10 !--- Define CFTOKEN CFID as temporary variables, this will alleviate the problem of security in accessing another clients variables //--- CFIF isDefined('Cookie.CFID') AND isDefined('Cookie.CFTOKEN') CFSET tempID = Cookie.CFID CFSET tempToken = Cookie.CFTOKEN CFCOOKIE NAME=CFID value=#tempID# CFCOOKIE NAME=CFTOKEN value=#tempToken# /CFIF /CFLOCK Doug - Original Message - From: Chris Bohill [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:21 AM Subject: Having major problems with session variables Hi, Session Variables seem to be a hot topic at the minute, so I was wondering if anyone could shed some light or give some advice on the problem below. We have a multiple user web based application that is all user-profile based. User A is the site administrator with full access to the site. User B is a member of company 1, and he can only see his companies data on the site. User C is a member of company 2, and he can only see his companies data on the site. What we are experiencing is a swapping of user profiles. User B is logging in as himself and is happily navigation through the site, gaining access to their own data, until they start to see information which is supposed to only be relevant to User C. User A is sometimes logging in, and is getting restricted access to the site because he has somehow inherited the profile of another user (who has a lower access privilege). Somehow the profiles are being swapped while the users are in the system. We are using session variables for the profiling, and access privileges, but the somehow are getting mixed up. When we are calling session variables in a query on any individual page we have declared local variables corresponding to these at the top of the page, and referenced these throughout the rest of the page, see below, cflock timeout=10 type=READONLY scope=SESSION cfset Variables.chris = session.chris /cflock . cfquery name=queryName datasource=#mydsn# Select * from table where user_id = #Variables.chris# /cfquery We are also using StructClear() to kill the session variables when the user logs out. I do not know what else to do, as the problem is still persisting. Has anyone experienced this, or can they offer any advice or direction. Cheers, ~~ 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: Form problem
Well I am trying to get away from the reload action, I want it to be as fast as possible for the user. Doug - Original Message - From: Jon Hall [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:29 AM Subject: Re: Form problem I'm assuming that when they select a different address from the dropdown you submit to the page again and query out the values for that address. So why not just do the query for something that will never return a record when they select new? Since CF will always populate a query that returns no records with null values you could just keep the code the way it is and let the fields be set as nulls. jon - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 12:08 PM Subject: Form problem I have a shipping form for an e-commerce site and have a delima. The form is populated from a query that grabs the last shipping address that the customer used. I have a dropdown on the page now that gives the user the option to choose from the list of addresses they have used in the past, and have an option for NEW. I need to be able to clear the fields in the form when they select new from the dropdown. Will it be best to populate the dropdown from a structure and have the new element be blank? Doug ~~ 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: Having major problems with session variables
Are you literally using the user's first name as the session variable? if so I would not do this. If you have not done so create a user table with a unique ID for each user and when they log in use that unique ID as the session variable for that user. Also check overall for variable naming to make sure that the same names are not being used for different variables and in addition make sure that all variables are fully scoped. I would also check that the user session variables are being deleted by checking if they still exists after they are supposed to have been deleted. One last tip, directly after log in I usually present the user with a screen saying something like Welcome Joe Bloggs to xxx, if you are not Joe Bloggs please log in again. May seem obvious but it is a small double-check that something did not go wrong in the log on process. Hope this is relevant and helps. Mike Brunt Sempra Energy 213.244.5226 System Error: press F13 to continue... -Original Message- From: Chris Bohill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 9:21 AM To: CF-Talk Subject: Having major problems with session variables Hi, Session Variables seem to be a hot topic at the minute, so I was wondering if anyone could shed some light or give some advice on the problem below. We have a multiple user web based application that is all user-profile based. User A is the site administrator with full access to the site. User B is a member of company 1, and he can only see his companies data on the site. User C is a member of company 2, and he can only see his companies data on the site. What we are experiencing is a swapping of user profiles. User B is logging in as himself and is happily navigation through the site, gaining access to their own data, until they start to see information which is supposed to only be relevant to User C. User A is sometimes logging in, and is getting restricted access to the site because he has somehow inherited the profile of another user (who has a lower access privilege). Somehow the profiles are being swapped while the users are in the system. We are using session variables for the profiling, and access privileges, but the somehow are getting mixed up. When we are calling session variables in a query on any individual page we have declared local variables corresponding to these at the top of the page, and referenced these throughout the rest of the page, see below, cflock timeout=10 type=READONLY scope=SESSION cfset Variables.chris = session.chris /cflock cfquery name=queryName datasource=#mydsn# Select * from table where user_id = #Variables.chris# /cfquery We are also using StructClear() to kill the session variables when the user logs out. I do not know what else to do, as the problem is still persisting. Has anyone experienced this, or can they offer any advice or direction. Cheers, ~~ 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: Radio Button
That worked perfect it did exactly what I wanted it too. Thanks I did a little reading on IIF and DE and they are going to be very useful. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 11:33 AM To: CF-Talk Subject: RE: Radio Button input type=radio name=status value=Not Assigned Yet #IIf(status is Not Assigned Yet, de(checked) ,de ())# If you don't put quotes around the Not Assigned Yet, CF will assume it has to evaluate it input type=radio name=status value=Not Assigned Yet #IIf(status is Not Assigned Yet, de(checked) ,de ())# Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 Websites for the real world ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ 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: ActiveMail
At 16:45 13/11/01 Tyler Silcox said Anybody out there in the great ColdFusion hell that is cfmail use ActiveMail from CFDev.com? (http://www.cfdev.com/jmail/) I talked to them a few weeks ago and it seems like a much needed replacement for cfmail. I'm soliciting responses for how it's working for those of y'all that are using it; how many emails can it handle? Do you loop around the tag or do you use ValueList()?, etc. (How many values could ValueList() support in the first place?) I know they are supposed to release an update sometime real soon, if they haven't done it already, that's supposed to handle a query input and a few other things... I can not speak for Active Mail but can about the limitations of of the CFMail tag. We use Howie's iMS Server. We use the SE edition regularly to send out substantial volumes of customized mail. Online Data Systems has a comparison of features of the various replacements for CF Mail that you might find useful URL below. Probably worth your while to look at all the solutions http://www.coolfusion.com/imssecomparison.cfm There is a an iMS support list which is very good. I confess to lurking and learning all the time. grin Regards Gordon ~~ 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: Are forms really structures?
That is one of the most useful sites i've been to . Why is this site not publicised?? I have loads of additional notes and tips scrawled on pages of my paper documentation which I would love to inform allaire of. cheers Kola Oyedeji Web developer Macromedia Certified Advanced ColdFusion 5 Developer http://www.Alexandermark.com (+44)020-8429-7300 -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] Sent: 13 November 2001 17:15 To: CF-Talk Subject: Re: Are forms really structures? Kola Oyedeji wrote: AFAIK the form scope is available as a structure: If i have a form with the following field: form name=myform action=test3.cfm method=post input type=text name=name value=kola input type=Submit /form and on the action page create an additional form field, Then loop over the field names with the follwing code, only the real form field submmited by the form is displayed. cfset form.fake = hello cfloop list=#fieldnames# index=current brcfoutput#current#/cfoutput /cfloop You are not looping over the form scope here, you are looping over the form variable form.fieldnames. The presence of this variable in the debug output makes me believe that this list is actually created by the browser and submitted together with all the other formfields. Which would also explain why this variable is not updated when adding fields to the form scope/structure serverside. If I then loop over the form as a structure: So the question is, is this a feature or a bug? Feature. But maybe one that requires a note at livedocs.allaire.com Jochem ~~ 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
Flash Kit Calendar Error
I thought it was my application screwing up the flash kit calendar. But even when I tried the test it gives me a javascript error saying Line:11 Char:2 Error: 'document.all.obj' is null or not an object Code: 0 Anyone from Fig Leaf have an answer? Just downloaded it today. First time looking at it. Robert Everland III Dixon Ticonderoga ~~ 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: StructClear(session) again...
How is username defined here? The answer is probably obvious, but I'm still working on my first cup of coffee. - Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com - - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 7:57 AM Subject: Re: StructClear(session) again... structClear(session.loggedIn,username) would be a better alternative. Db ~~ 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: Are forms really structures?
You are not looping over the form scope here, you are looping over the form variable form.fieldnames. The presence of this variable in the debug output makes me believe that this list is actually created by the browser and submitted together with all the other formfields. Which would also explain why this variable is not updated when adding fields to the form scope/structure serverside. The variable FORM.FIELDNAMES doesn't come from the browser; it's created by CF in any script to which form data has been submitted. It's been around in CF since at least version 2, and it allows the construction of generalized form data handlers, since you can loop through the list of all form data sent from the browser with it. Of course, in version 4.x and up, you're probably better off looping over the Form structure. I suspect that FORM.FIELDNAMES has been kept around with its behavior unchanged just for backward compatibility. One interesting thing about FORM.FIELDNAMES is that, if you have multiple form fields with the same name, the name is listed multiple times in FORM.FIELDNAMES, which reflects how the browser actually sends the data. So, if you use it to write a generalized form data handler, you have to take that into account. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: (202) 797-5496 fax: (202) 797-5444 -Original Message- From: Jochem van Dieten To: CF-Talk Sent: 11/13/01 12:15 PM Subject: Re: Are forms really structures? Kola Oyedeji wrote: AFAIK the form scope is available as a structure: If i have a form with the following field: form name=myform action=test3.cfm method=post input type=text name=name value=kola input type=Submit /form and on the action page create an additional form field, Then loop over the field names with the follwing code, only the real form field submmited by the form is displayed. cfset form.fake = hello cfloop list=#fieldnames# index=current brcfoutput#current#/cfoutput /cfloop If I then loop over the form as a structure: So the question is, is this a feature or a bug? Feature. But maybe one that requires a note at livedocs.allaire.com Jochem ~~ 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: cfSchedule is not doing anything
Do I have to have the coldfusion executive running for CFSchedule to work on an NT server or Just when using LocalHost. Yes, the CF Executive service must be running to use CFSCHEDULE or the scheduling options in CF Admin. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: (202) 797-5496 fax: (202) 797-5444 ~~ 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: StructClear(session) again...
Well it depends on what the key is in your structure. I personally do not use a struct for keeping my login stuff, I just use the temp token etc. They will be independenat of eachother and will expire immediately once the user closes his browser. login page cfquery name=getLogin datasource=myDsn SELECT username,password FROM cust_login WHERE username = '#userName#' AND password = '#password#' /cfquery cfif getLogin.recordCount GT 0 cfset session.loggedIn = true cfelse cflocation url=/index.cfm?fuseaction=loginbadlogin=yes /cfif CFIF isDefined(session.loggedIn) CFSET session.loggedIn = false /CFIF - Original Message - From: Matt Robertson [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:58 AM Subject: Re: StructClear(session) again... How is username defined here? The answer is probably obvious, but I'm still working on my first cup of coffee. - Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com - - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 7:57 AM Subject: Re: StructClear(session) again... structClear(session.loggedIn,username) would be a better alternative. Db ~~ 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) Access, SQL Server and Replication
Sounds like a job for WDDX I have done something like this where Excel running locally talks to a web server by WDDX so I don't suppose it would be too difficult to get Access to do the same. Owens, Howard wrote: I have a client with an ecommerce site (not quite finished yet). One of the issues is keeping the online inventory in sync with the in-store inventory. He only has a dial up connection and one phone line, so he doesn't want to be online all of the time. He does have Access on his computer. I know the SQL Server client tools have some sort of replication ability. What I'm wondering ... and I'm hoping one of the SQL Server guru's here can tell me if it's possible ... Can I use the SQL Server client tools to, on a daily basis, replicate his inventory in-store with the main SQL Server? And is there a way to daily have the two databases talk to each other and figure out which inventories have changed (the in-store database will have modifications each day as will the online database). And to complicate matters further, the client has two store locations and that inventory should be in synch, also. Just in theory, is this a solvable issue using the tools available? Howard Owens Internet Operations Coordinator www.insidevc.com [EMAIL PROTECTED] AIM: GoCatGo1956 ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
But surely that means that CF is using double the memory for every request... Memory to store the session details and memory to store the session details.. Tis true, but the sites I've done so far aren't generally high-traffic sites, and there haven't been any problems. In fact, 99% of the time in the work I do, session variables - and hence the request scope doubling-up - are only used in the backend CMS, only used by a few people at a time. Plus, my guess is/was that the general server load would be balanced out by the reduction of any number of CFLOCKs down to one (in application.cfm) - tho this could be a wrong-headed way of thinking about it. Anyone got any opinions - even better, stats! - on the impact of using this session request transference technique on server performance/load? At what sort of stage / under what circumstances would it become a real issue? Whats wrong with setting CFAdmin to automatically lock reads... That way any time you read a shared var ie IsDefined and DSN's etc its already locked... Then all you have to do is lock the writes.. The majority of the sites I do, I don't have access to CF Admin. - Gyrus ~~ 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: Form problem
Here is an example... http://216.136.31.164/jsarray.htm You could go one further and populate javascript arrays with all of the addresses they have and then populate the fields with the array values depending on what they selected. jon - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 12:42 PM Subject: Re: Form problem Well I am trying to get away from the reload action, I want it to be as fast as possible for the user. Doug - Original Message - From: Jon Hall [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:29 AM Subject: Re: Form problem I'm assuming that when they select a different address from the dropdown you submit to the page again and query out the values for that address. So why not just do the query for something that will never return a record when they select new? Since CF will always populate a query that returns no records with null values you could just keep the code the way it is and let the fields be set as nulls. jon - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 12:08 PM Subject: Form problem I have a shipping form for an e-commerce site and have a delima. The form is populated from a query that grabs the last shipping address that the customer used. I have a dropdown on the page now that gives the user the option to choose from the list of addresses they have used in the past, and have an option for NEW. I need to be able to clear the fields in the form when they select new from the dropdown. Will it be best to populate the dropdown from a structure and have the new element be blank? Doug ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
Plus, my guess is/was that the general server load would be balanced out by the reduction of any number of CFLOCKs down to one (in application.cfm) - tho this could be a wrong-headed way of thinking about it. Anyone got any opinions - even better, stats! - on the impact of using this session request transference technique on server performance/load? At what sort of stage / under what circumstances would it become a real issue? I don't have any handy statistics, but in most of the cases I've encountered, this technique has been significantly detrimental to performance. That doesn't mean that it's always a bad thing to do, or that there's always a better way, just that in most cases, applications have enough data in the session or application scopes that it's less expensive to reference the bits of it that you need within separate CFLOCKs than it is to copy it back and forth to a local nonpersistent scope. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: (202) 797-5496 fax: (202) 797-5444 ~~ 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: StructClear(session) again...
DOH! I define the structure. duh. Thanks for the pointer ;D --Matt-- - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 10:24 AM Subject: Re: StructClear(session) again... Well it depends on what the key is in your structure. I personally do not use a struct for keeping my login stuff, I just use the temp token etc. They will be independenat of eachother and will expire immediately once the user closes his browser. login page cfquery name=getLogin datasource=myDsn SELECT username,password FROM cust_login WHERE username = '#userName#' AND password = '#password#' /cfquery cfif getLogin.recordCount GT 0 cfset session.loggedIn = true cfelse cflocation url=/index.cfm?fuseaction=loginbadlogin=yes /cfif CFIF isDefined(session.loggedIn) CFSET session.loggedIn = false /CFIF - Original Message - From: Matt Robertson [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 9:58 AM Subject: Re: StructClear(session) again... How is username defined here? The answer is probably obvious, but I'm still working on my first cup of coffee. - Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com - - Original Message - From: Douglas L. Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 7:57 AM Subject: Re: StructClear(session) again... structClear(session.loggedIn,username) would be a better alternative. Db ~~ 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
StructClear(Session)
Douglas said: One thing to note, is that with structClear() you will be killing all session vars and not just the user that logged out. I just checked, and in my app at least, this is not true. I use StructClear(session) to log folks out and it works just fine. I just tried logging in as two different users on two different machines, and I could log out one account and the other continued with no problems. I would think it would be a major inconsistency for it to clear all session variables for all sessions, since you can only set variables for the one active session. Here's the contents of my act_logout.cfm file: CFSET tmp = StructClear(Session) cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW - Eric ~~ 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: SUMMARY: Request Scope Follow up Locking Questions
I would think it would depend on the usage in the app. For instance I refer to the data source in dozens if not hundreds of places in my apps and I certainly am going to make that a request scope var because I doubt there is measurable overhead in request.ds=blah and it avoids putting locks in nearly every template. If, however, I have a complex struct which I refer to only in a few places I am going to leave that a session or application var and lock it when necessary rather than duplicate the struct every time I hit application.cfm. I don't think a generalization is possible. - Original Message - From: Dave Watts [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 12:09 PM Subject: RE: SUMMARY: Request Scope Follow up Locking Questions Plus, my guess is/was that the general server load would be balanced out by the reduction of any number of CFLOCKs down to one (in application.cfm) - tho this could be a wrong-headed way of thinking about it. Anyone got any opinions - even better, stats! - on the impact of using this session request transference technique on server performance/load? At what sort of stage / under what circumstances would it become a real issue? I don't have any handy statistics, but in most of the cases I've encountered, this technique has been significantly detrimental to performance. That doesn't mean that it's always a bad thing to do, or that there's always a better way, just that in most cases, applications have enough data in the session or application scopes that it's less expensive to reference the bits of it that you need within separate CFLOCKs than it is to copy it back and forth to a local nonpersistent scope. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: (202) 797-5496 fax: (202) 797-5444 ~~ 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: StructClear(Session)
I actually just needed to delete a structure, so I read up a little and tried out some cfdumps, and according to Jedi Master Forta (Web Application Construction Kit, 4th Ed), StructClear just erases the current user's session (and everything in it.) It doesn't erase all session variables on the server, just the one's tied to that user's CFID and CFToken, which includes CDID, CFToken, SessionID, URLToken, and whatever variables your application uses... Tyler Silcox email | [EMAIL PROTECTED] website | www.gslsolutions.com - Original Message - From: Maia, Eric [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 2:31 PM Subject: StructClear(Session) Douglas said: One thing to note, is that with structClear() you will be killing all session vars and not just the user that logged out. I just checked, and in my app at least, this is not true. I use StructClear(session) to log folks out and it works just fine. I just tried logging in as two different users on two different machines, and I could log out one account and the other continued with no problems. I would think it would be a major inconsistency for it to clear all session variables for all sessions, since you can only set variables for the one active session. Here's the contents of my act_logout.cfm file: CFSET tmp = StructClear(Session) cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW - Eric ~~ 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: StructClear(Session)
Douglas said: One thing to note, is that with structClear() you will be killing all session vars and not just the user that logged out. I just checked, and in my app at least, this is not true. I believe that it will not clear out the CFIF and CFToken in versions 4.x but will do so in version 5 So it depends on what version of CF you are using ~~ 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
Text Area character count and differential-incremental insert
I am working on a ColdFusion 5.0 DB2-ODBC application and have the need to count the characters inserted into a text area and action different SQL dependant on the number of characters. The text area input has to be broken into chunks of 250 characters unknowns to the application user (they go on merrily typing). The first 250 characters go into the prime table and the following chunks of 250 characters need to be inserted as separate records in a second datasource each chunk have an incremented sequential ID. The chunks are reassembled into a contiguous blocks at SQL Select-Run time using the incremented sequential ID. All this complexity is because the DB2 datasource cannot accept more that 250 character blocks. Has anyone done anything like this or can give me any pointers to where to look. Mike Brunt Sempra Energy 213.244.5226 Artificial Intelligence usually beats natural stupidity. ~~ 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: StructClear(Session)
Douglas said: One thing to note, is that with structClear() you will be killing all session vars and not just the user that logged out. I just checked, and in my app at least, this is not true. I believe that it will not clear out the CFIF and CFToken in versions 4.x but will do so in version 5 So it depends on what version of CF you are using I've just been told that it does this in CF 4.5 as well so I guess its versions prior to CF4.5 that are session safe. ~~ 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
Crash Studio 4.5.2 lost data.
I've had this twice in the last month. I go to close studio and get access violation errors can not close the application have to use the task manager. When I look at the page that was opened at the time I now have zero bytes in the file. (GRRR). This has happened on a windows 98 and XP PC. I moved to XP because of CF studio windows crashing all the time (for years) heard it worked well on nt so I tried XP (Guess I should have gone with NT). It has been running great till now. Has anybody had this problem and did you fix it? I just lost a couple of hours work. Off to load the back up tape and see how much I lost. Thanks David Green [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: Crash Studio 4.5.2 lost data.
I think this may have happened to me when I've had files open in browse mode when I closed. I always make sure that I've closed all files before closing Studio, or at least switch into Edit mode. Eric -Original Message- From: David Green [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 12:45 PM To: CF-Talk Subject: Crash Studio 4.5.2 lost data. I've had this twice in the last month. I go to close studio and get access violation errors can not close the application have to use the task manager. When I look at the page that was opened at the time I now have zero bytes in the file. (GRRR). This has happened on a windows 98 and XP PC. I moved to XP because of CF studio windows crashing all the time (for years) heard it worked well on nt so I tried XP (Guess I should have gone with NT). It has been running great till now. Has anybody had this problem and did you fix it? I just lost a couple of hours work. Off to load the back up tape and see how much I lost. Thanks David Green [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: Crash Studio 4.5.2 lost data.
I just lost a couple of hours work. Off to load the back up tape and see how much I lost. Before you go to the backup tapes... did you try looking in the windows/temp folder for the machine running CF Studio? Sort it by date or look for files beginning with cf~. I've found a lot of lost/corrupted work this way... Good luck! Megan [EMAIL PROTECTED] Alpha 60 Design Shop http://www.alpha60.com phone: 202-745-6393 fax: 202-745-6394 ~~ 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: Crash Studio 4.5.2 lost data.
I have had the same problem before, and I am running Win 2K. Another problem that I encounter using the same release as you mentioned below, is when using RDS to save files. Sometimes, when I save a file and then alt+tab to another file that I have open, the file saving will overwrite the file that I alt+tab to. I solved the later problem by waiting until the save finishes before alt+tabbing to the next open file. I still haven't seen a solution for the previous problem, although I'm sure it's probably fixed in CF Studio 5 :-) -- Jeff -Original Message- From: David Green [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 2:45 PM To: CF-Talk Subject: Crash Studio 4.5.2 lost data. I've had this twice in the last month. I go to close studio and get access violation errors can not close the application have to use the task manager. When I look at the page that was opened at the time I now have zero bytes in the file. (GRRR). This has happened on a windows 98 and XP PC. I moved to XP because of CF studio windows crashing all the time (for years) heard it worked well on nt so I tried XP (Guess I should have gone with NT). It has been running great till now. Has anybody had this problem and did you fix it? I just lost a couple of hours work. Off to load the back up tape and see how much I lost. Thanks David Green [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: MySQL ODBC on Linux
look at http://www.mysql.com/doc/A/d/Adding_users.html to set up the users in mysql. Alex, - Original Message - From: Brian Silvers [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, November 11, 2001 11:57 AM Subject: Re: MySQL ODBC on Linux Bud, yes the username and password can be entered in the CF Administrator. That is how I set mine up. You have to make sure the user has privileges to access the mysql server from the box you'll be connecting to it from. Brian - Original Message - From: Bud [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, November 11, 2001 11:38 AM Subject: Re: MySQL ODBC on Linux On 11/11/01, Alex penned: They don't know what they are doing. You need to insert your info into the MySQL database tables user, password, and host I think. But what about for the connection? Can the username and password be entered in CF administrator? I'd appreciate it if anyone can give me a quick rundown. Thanks. On Sat, 10 Nov 2001, Bud wrote: I'm trying to get an application to work on Linux using MySQL that already works on NT. The host tells me there is no way to set up the username and password directly in the ODBC DSN, that I need to put them in the cfquery tag. Is this true? I don't want to maintain 2 versions of the application and I know the username and password is more secure when set up directly in the DSN. -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ ~~ 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: Crash Studio 4.5.2 lost data.
I have this used to happen to me a lot until I started saving my documents a lot then I quit using the browse feature it hasn't happened since. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: David Green [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 2:45 PM To: CF-Talk Subject: Crash Studio 4.5.2 lost data. I've had this twice in the last month. I go to close studio and get access violation errors can not close the application have to use the task manager. When I look at the page that was opened at the time I now have zero bytes in the file. (GRRR). This has happened on a windows 98 and XP PC. I moved to XP because of CF studio windows crashing all the time (for years) heard it worked well on nt so I tried XP (Guess I should have gone with NT). It has been running great till now. Has anybody had this problem and did you fix it? I just lost a couple of hours work. Off to load the back up tape and see how much I lost. Thanks David Green [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: Crash Studio 4.5.2 lost data.
Thanks all for the help. Yes I was in browse mode when I closed the studio. wont be again :). Looking for temp file now. Again thanks David - Original Message - From: Steven Lancaster [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 12:55 PM Subject: RE: Crash Studio 4.5.2 lost data. I have this used to happen to me a lot until I started saving my documents a lot then I quit using the browse feature it hasn't happened since. Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -Original Message- From: David Green [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 2:45 PM To: CF-Talk Subject: Crash Studio 4.5.2 lost data. I've had this twice in the last month. I go to close studio and get access violation errors can not close the application have to use the task manager. When I look at the page that was opened at the time I now have zero bytes in the file. (GRRR). This has happened on a windows 98 and XP PC. I moved to XP because of CF studio windows crashing all the time (for years) heard it worked well on nt so I tried XP (Guess I should have gone with NT). It has been running great till now. Has anybody had this problem and did you fix it? I just lost a couple of hours work. Off to load the back up tape and see how much I lost. Thanks David Green [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
Passing recordsets between CF and Oracle 8 stored procedures
¿Is it possible to do it with CF Server 4.5? ¿Both ways even? ~~ 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
More OT Javascript: Dual Submit Buttons on One Form.
There really should be a single repository for information about these common JS tasks that nearly all CF Programmers will need to use sooner or later :) input type=submit value=delete onclick=document.Timeentry_billable.action='timeentry_deletechargeinfo. cfm';document.Timeentry_billable.submit(); class=buttons Now..this matches what people sent me...but for some reason I keep getting Object Does not Support This Method. :-\ Any ideas? Also..do you all know of a good Javascript resource in the CF Community that has these common methods? -Gel ~~ 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
TextArea wrapping
I need to figure out why some textareas are limited in my table to the width of 100% while others just go way over. Is there something I could be missing. The contents of the text area are sentences not solid strings so you would think it could wrap? Thanks, Neil ~~ 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: TextArea wrapping
Wrap textarea wrap=off/soft/hard/virtual Check with w3c for official usage. Good luck, Alexander Sicular Chief Technology Architect Neurological Institute of New York Columbia University as867 [at] columbia {dot} edu |-Original Message- |From: Neil H. [mailto:[EMAIL PROTECTED]] |Sent: Tuesday, November 13, 2001 5:05 PM |To: CF-Talk |Subject: TextArea wrapping | | |I need to figure out why some textareas are limited in my |table to the width of 100% while others just go way over. Is |there something I could be missing. The contents of the text |area are sentences not solid strings so you would think it could wrap? | |Thanks, | |Neil | | ~~ 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: More OT Javascript: Dual Submit Buttons on One Form.
I get that all of the time. Name your submit button something else. I think it has a default name as submit, so when you call the submit method: document.Timeentry_billable.submit(); It thinks you are referring to the submit button, not the form's method. so you need something like: input type=submit name=MyDeleteButton value=delete -Craig - Original Message - From: Angel Stewart [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 3:44 PM Subject: More OT Javascript: Dual Submit Buttons on One Form. There really should be a single repository for information about these common JS tasks that nearly all CF Programmers will need to use sooner or later :) input type=submit value=delete onclick=document.Timeentry_billable.action='timeentry_deletechargeinfo. cfm';document.Timeentry_billable.submit(); class=buttons Now..this matches what people sent me...but for some reason I keep getting Object Does not Support This Method. :-\ Any ideas? Also..do you all know of a good Javascript resource in the CF Community that has these common methods? -Gel ~~ 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
Verity Indexing Headaches
Hi all, I have a problem with Verity, basically it doesn't index everything I tell it to index. I am populating an index using CFINDEX from a query with about 1700 records, the process works fine. Problem comes when I go to search, not all of the records are there... for example... Carlton Rest Home,503 Otumoetai Rd ,Tauranga,Cherrywood,Bay Of Plenty, Rotorua, Taupo,Sandy Neels,Sandy Lloyd NeelsCarlton Rest Home Nursing Care (in rest home) is NOT there (search for Carlton) while Carter House,69 Moehau Rd ,Te Puke,,Bay Of Plenty, Rotorua, Taupo,,Carter House Nursing Care (in rest home) is there (search for Carter) it's got me stumped... here is the code if anybody can point me in the right direction, the CFOUTPUT is there for debugging (that's where those two examples come from) CFINDEX ACTION=PURGE COLLECTION=ElderNet CFOUTPUT QUERY=Q_EldernetVerity #FaName#,#FaAddress#,#FaCity_Town#,#FaSuburb#,#FaArea#,#FaManagerName#,#FaOwnerName#,#FaStDetails#,#FaStWhatIsNew#,#FaWhatIsNew#,#Title#BR /CFOUTPUT CFINDEX ACTION=UPDATE COLLECTION=ElderNet QUERY=Q_ElderNetVerity BODY=FaName,FaAddress,FaCity_Town,FaSuburb,FaArea,FaManagerName,FaOwnerName,FaStDetails,FaStWhatIsNew,FaWhatIsNew,Title Title=Title KEY=FaStID CUSTOM1=#CFG.insecureServer#/fusebox.cfm?FuseAction=DisplayServiceFaStID= -- James Sleeman Innovative Media Ltd Phone: (03) 377 6262 http://www.websolutions.co.nz/ CAUTION: The information contained in this email message is confidential and may be legally privileged. If the reader of this message is not the intended recipient you are notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately and destroy the original message and any attachments. Views expressed in this communication may not be those of Innovative Media Ltd. ~~ 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: More OT Javascript: Dual Submit Buttons on One Form.
Umm.. I tried that..a new name and stuff. input name=Deletebutton type=button value=Add More onclick=document.Timeentry_billable.action='timeentry_deletechargeinfo. cfm';document.Timeentry_billable.submit(); class=buttons And I still get that same exact error. It is driving me nuts..I can't understand! :-\ -Gel -Original Message- From: Craig [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 6:27 PM To: CF-Talk Subject: Re: More OT Javascript: Dual Submit Buttons on One Form. I get that all of the time. Name your submit button something else. I think it has a default name as submit, so when you call the submit method: document.Timeentry_billable.submit(); It thinks you are referring to the submit button, not the form's method. so you need something like: input type=submit name=MyDeleteButton value=delete -Craig ~~ 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
SQL Query
SELECT DISTINCT highlightDates.highlightID, HighlightDates.HighlightDate, Highlights.* FROM Highlights, HighlightDates WHERE HighlightDates.HighlightDate = #startweek# AND HighlightDates.highlightdate = #DateAdd('ww', 1, startweek)# AND Highlights.HighlightID = HighLightDates.HighlightID AND Highlights.Status = 1 Can some one tell me why the query above doesn't work I thought it would only look at highlightDates.highlightID and select a distinct one of those, but it seems to be trying to do a distinct over all of the selected fields help! how can i make it select a distinct highlightID? ~~ 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 Query
because you have Highlights.* ... shlomy -Original Message- From: Nick Le Mouton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 5:51 PM To: CF-Talk Subject: SQL Query SELECT DISTINCT highlightDates.highlightID, HighlightDates.HighlightDate, Highlights.* FROM Highlights, HighlightDates WHERE HighlightDates.HighlightDate = #startweek# AND HighlightDates.highlightdate = #DateAdd('ww', 1, startweek)# AND Highlights.HighlightID = HighLightDates.HighlightID AND Highlights.Status = 1 Can some one tell me why the query above doesn't work I thought it would only look at highlightDates.highlightID and select a distinct one of those, but it seems to be trying to do a distinct over all of the selected fields help! how can i make it select a distinct highlightID? ~~ 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