RE: Prevent users from voting twice.
Why not use some sort of captcha they have to enter in addition to selecting the item they wish to vote for. It is hard to automate reading captcha. That combined with a cookie will reduce the amount of duplicates. This email may contain material confidential to Pearson. If you were not an intended recipient, please notify the sender and delete all copies. We may monitor email to and from our network. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300132 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Multiple data sources in one query?
That depends. If for example the datasources point to two different databases on the same server for which the login for the datasource used in the cfquery tag has access to both it is trivial. Or if they are on two different servers joined by a linked server and the user has access to both. Example Database a on server 1 Database b on server 2 both allow login by user bob There is a link set up on the data base server between the two or they are on the same server Datasource x points to database a Datasource y points to database b cfquery name=REQUEST.qSelectFromAandB datasource=x SELECT table1.firstcolumn, table2.firstcolumn FROM a.dbo.table1 AS table1 INNER JOIN b.dbo.table2 AS table2 ON table2.table1ID = table1.table1ID /cfquery IF there is no link on the database between the two you can query the relevant data from each in separate queries and use a query of queries to join them. -Original Message- From: Charles Love [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 1:26 PM To: CF-Talk Subject: Multiple data sources in one query? Does anyone know if there is a way to access data from multiple data sources in one query or joined query? ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286502 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is cfqueryparam worth it?
The default sql driver for cf 6 - 8. MSSQL versions 2000 and 2005. Data direct versions 3.3 and greater. It's always been a problem. Most people aren't running databases with the amount of data we are, hundreds of tables many of them with millions or hundreds of millions of rows of data, and a transaction count that would make your head spin. -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Saturday, August 11, 2007 3:26 AM To: CF-Talk Subject: Re: Is cfqueryparam worth it? Porter, Benjamin L. wrote: When you use cfqueryparam the statement that gets compiled uses sp_prepexec. For which driver and which MS SQL Server version did you observe this? Jochem ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286063 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: sql not in
I think this is the fastest way you can do it in mssql SELECT a,b,c,d FROM tbl1 WHERE tbl1.a = [passed in a] AND NOT EXISTS ( SELECT 'x' FROMtbl2 WHERE tbl2.a = tbl1.a AND tbl2.b = tbl1.b AND tbl2.c = tbl1.c AND tbl2.d = tbl1.d ) -Original Message- From: Tim Do [mailto:[EMAIL PROTECTED] Sent: Thursday, August 09, 2007 2:37 PM To: CF-Talk Subject: OT: sql not in how do I return values from tbl1 where values are NOT in tbl2. tbl1 a,b,c,d tbl2 a,b,c,d only a is passed in. b,c,d are unique. tbls do not have identity fields. thanks, tim ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285986 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Is cfqueryparam worth it?
That is a false statement. There are reasons not to use it. They come with perils. If the data being sent to the query does not come from the outside then the only risk to SQL injection comes from the developers working on the query, and they have other ways to cause havoc without having to write SQL injection attacks. When you use cfqueryparam the statement that gets compiled uses sp_prepexec. This causes MSSql server to generate the query execution plan for the query before actually executing the query. This can actually end up causing the server to run the query 2x. If you have a very long running query for a report for example that queries millions of records of data against millions of other records of data etc. and takes several minutes or hours to execute you do not want that to happen 2x every call. In theory when sp_prepexec generates the execution plan that is cached and not needed to be created again however on high volume / traffic sql servers it is not possible to cache every execution plan forever. Often long running queries that are executed rarely fall out of the execution plan cache. This can create a huge performance problem for a sql server. I would agree with the statement that you should use cfqueryparam whenever you can and only not use it when you absolutely have to. For the cases like I describe above you can write the bind variables yourself into the query and gain the same benefit without sp_prepexec being called. IE SELECT columnA FROMtableb WHERE columnC = cfqueryparam cfsqltype='cf_sql_varchar' maxlength='2' value='ab' / Could become DECLARE @param1 varchar(2) SET @param1 = 'ab' SELECT columnA From tableb WHERE columnC = @param1 -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Friday, August 10, 2007 11:18 AM To: CF-Talk Subject: RE: Is cfqueryparam worth it? As many others have said, there is never a reason NOT to use cfqueryparam. You can still use your trick and cfqueryparam doesn't have to bomb: cfqueryparam cfsqltype=cf_sql_integer value=#val(url.userid)# M!ke -Original Message- From: Ben Mueller [mailto:[EMAIL PROTECTED] Sent: Friday, August 10, 2007 12:01 PM To: CF-Talk Subject: Is cfqueryparam worth it? I'm trying to determine if cfqueryparam is really worth using. For data validation, we tend to do something like this: SELECT username FROM user where userID = #int(URL.userID)# the nice thing about this is that if URL.userID isn't an integer, int() returns 0, and the query executes and simply returns no records. For us, this is a far preferable method than what cfqueryparam would do, which is to bomb before executing the query. Then today I discovered that cfqueryparam supports bind variables, which theoretically will improve database performance. So now the question is: how much does it improve performance? Am I really going to notice it? Should I really switch my queries over to something like this: SELECT username FROM user where userID = cfqueryparam CFSQLType=CF_SQL_INTEGER value=#int(URL.user_id)# Any advice is appreciated. Thanks, Ben ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285989 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: any idea how to
Using SQL CONVERT(VARCHAR,CONVERT(DATETIME,'20060523'),101) Using CF Mid('20060523',5,2) '/' Right('20060523',2) '/' Left('20060523',4) -Original Message- From: Loathe [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 11:10 AM To: CF-Talk Subject: RE: any idea how to Date format? Left, mid, right? -Original Message- From: Scott Stewart [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 12:05 PM To: CF-Talk Subject: any idea how to Convert 20060523 Into 5/23/2006 I'm at a loss. Thanks in advance sas -- Scott Stewart ColdFusion Developer SSTWebworks 4405 Oakshyre Way Raleigh, NC. 27616 (703) 220-2835 http://www.sstwebworks.com http://www.linkedin.com/in/sstwebworks http://www.linkedin.com/in/sstwebworks ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285713 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Technical documentation sample
Is he looking for documentation that meets a certain CMMI level? I'd ask the client for an example of what they want, otherwise it is a moving target. -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 29, 2007 1:35 AM To: CF-Talk Subject: Technical documentation sample I'm asked to provide some technical documentation for a project, and I've done what I think is necessary, but the client's saying no I need PROPER technical documentation. Not what you have done. Well I thought i'd done a pretty good job of documenting the project, but i guess not. Does anyone have a technical document I can look at, so I can see what he might be meaning? -- Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279438 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Granular Security Model
I prefer something similar to what James mentioned but with the addition of groups or roles. The groups or roles would have a member table joining them 1 group/role to many permissions. A user could have either roles, and or permissions. If they had the role they by proxy had all the permissions the role has. When you start to have dozens of different permissions having roles / groups simplifies the management of them. -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 6:16 AM To: CF-Talk Subject: Re: Granular Security Model This could be normalised so that there is a user table, an enlitlement table and an m:n joining table between them (user_entitlement or similar). This way only a true (1) is indicated in the DB and you can assume false for everything else (inlcuding when initialising the struct in CF). On 5/24/07, Robert Rawlins - Think Blue wrote: The structs method work nicely from a ColdFusion point of view, but I felt the database was a little untidy as you had a separate database column for each 'entitlement' which was set to 0 or 1 dependant on the permissions, each user then had a row in this table. This was then stored in the struct as key/value pairs with each entitlement having its one struct element and a 'true' or 'false' value, you can then do something like cfif Session.User.Entitlements.DeleteUser to check if the user has that permission. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279127 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Take a minute to Digg this story about the Smith Project
Why could smith not offer the same performance and functionality? If it is open source potentially it will end up offering better performance and more functionality. The only thing I see going are those items that deal with flash. -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 9:53 AM To: CF-Talk Subject: RE: Take a minute to Digg this story about the Smith Project I'd easily be willing to sacrifice *SOME* functionality for the sake of cost. The jury's still out on exactly what I'd be willing to give up. andy -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 5:09 PM To: CF-Talk Subject: Re: Take a minute to Digg this story about the Smith Project But the fact is, if you wanted free ColdFusion, you would expect same functionality and performance as ColdFusion proper, which Smith cannot offer? This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Christopher Jordan To: CF-Talk Sent: Mon Feb 05 23:03:57 2007 Subject: Re: Take a minute to Digg this story about the Smith Project I'd move to it for all my smaller clients who cannot afford a copy of CF or BD (and that's quite a few). I'd want to download and play with it first though. I wrote and told them along time ago that it wasn't worth my time if it didn't support CFCs. They wrote back recently to tell me that the new version *does* support them. I still haven't tried the switch, but probably will fairly soon. Brad Wood wrote: The same argument could have been made for BD when it first came out. A similar argument could have probably been made for CF when it's first clunky version hit shelves. I've never tried Smith, but I still think it is cool. ~Brad -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 4:52 PM To: CF-Talk Subject: Re: Take a minute to Digg this story about the Smith Project And more to the point, who cares? Not to be the spoiler of the partay but I mean in all reality how many people, currently on CF/BD would consider a move to Smith? just because it is free. I would wager not that many, if any. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268829 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: previous date
#DateFormat(DateAdd(d,-1,Now()),dd)# -Original Message- From: Orlini, Robert [mailto:[EMAIL PROTECTED] Sent: Thursday, February 01, 2007 10:45 AM To: CF-Talk Subject: previous date I using #DateFormat(Now(),dd)-1# to get a previous date. However, using it today it gives me the previous date of 0 as opposed to 31. How do I get it to generate the previous date as the 31st as opposed to 0? I'm still new as to understanding this. Thanks! Robert O. HWW ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268324 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: slow query in cf but fast in Sql2k5 management studio.
How much data is it returning? A few rows, a few dozen, thousands, hundreds of thousands, millions. Sql2k5 just displays the results of the query. CF transforms the query into a java.util.Map which results in processing time on the CF server in addition to the processing time on the SQL server for each query. Also adding an appropriate blockfactor may speed this up as the driver may be sending one row at a time back to CF instead of as much as it can. Are you sure it is the query that is taking a long time or is it the transformation of the query into whatever view you are making out of it? Create a template with nothing in it but a cfquery call with the sql. Do not dump it or anything and see whether the code that renders the query results into something else is the culprit. If you can rule out CF processing as the issue, post the execution plan created. Maybe you are missing indexes etc. Try running the query with out using cfqueryparam if you are and compare the timing. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 10:17 AM To: CF-Talk Subject: RE: slow query in cf but fast in Sql2k5 management studio. SELECT a,b,c,d,e,f FROM tbl1 WHERE 1=1 AND ( b = txt1 AND c = int1 ) OR ( d IN (txt2,txt3) AND e = txt4) ORDER BY f the only thing specific that i can think of regarding this query is that columns d and e return long text (type text in sql2k5). What happens if you only select the other columns? Do you see a difference in execution speed then? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265812 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfqueryparam DECREASES performance?
CFQueryParam can indeed decrease performance. If you look at what happens when you use CFQueryParam versus just passing in variables it makes sense. CFQueryParam transforms any passed variables into bind variables. In MSSQL it is the same as declaring a variable, setting it and then using that in the query. IE SELECT Id, Description FROMProduct WHERE ProductID = 2 VS (with query param ) DECLARE @P1 int SET @P1 = 2 SELECT Id, Description FROMProduct WHERE ProductID = @P1 CF then uses a stored procedure spprepexec to try to force the dbms to precompile the sql statement into an execution plan for faster execution on subsequent calls. This is where you lose performance often. If your database does not have enough memory to store all of the prepared statements you will be essentially running the query 2x every time you call it. Once to generate the execution plan once to actually run it. The same thing happens if the query is not called often enough. IE in the case of reports run infrequently. The database will clear the execution plan for your query since it is not used often to make room for other queries. I would recommend writing a custom tag to replace cfqueryparam when used with infrequent long running reports. A query that takes 100 ms to run, is no big deal if it has to be recompiled once and a while. A query that runs for 3 minutes can be a major problem if it takes 2x as long 50% of the time. I wish Adobe would rewrite this functionality to take an optional parameter to specify whether to use sp prep exec. I've attached a custom tag I wrote to replace cfqueryparam in these cases. User beware it is not fully tested, and not as secure as cfqueryparam. -Original Message- From: Greg Luce [mailto:[EMAIL PROTECTED] Sent: Thursday, December 28, 2006 1:01 PM To: CF-Talk Subject: cfqueryparam DECREASES performance? OK, I must have something wrong here. I've only heard good things about cfqueryparam on this list for both security and performance. A client sent me an ugly report that times out for them. I spent an hour going through it and applying cfqueryparams to each variable in the many queries with appropriate datatypes. I threw a cfsetting tag in to increase the request timeout and the report runs in roughly about 512687 ms, restarted MSSQL server and CFMX7, then with the cfqueryparams the same query that was running in 5282ms in the old code, now takes 15094ms. Any ideas? ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265293 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfqueryparam DECREASES performance?
!--- adding any space between the cfsilent and the cfif tag will cause errors --- /cfsilentcfif IsDefined(Local.strQueryParameter)cfif NOT IsDefined(Local.USECFQUERYPARAM)cfoutput#Local.strQueryParameter#/ cfoutputcfelsecfqueryparam cfsqltype=#attributes.cfsqltype# value=#attributes.value# list=#attributes.list# separator=#attributes.separator# null=#attributes.null# maxlength=#attributes.maxlength# //cfif/cfif -Original Message- From: Porter, Benjamin L. Sent: Friday, December 29, 2006 7:58 AM To: CF-Talk Subject: RE: cfqueryparam DECREASES performance? CFQueryParam can indeed decrease performance. If you look at what happens when you use CFQueryParam versus just passing in variables it makes sense. CFQueryParam transforms any passed variables into bind variables. In MSSQL it is the same as declaring a variable, setting it and then using that in the query. IE SELECT Id, Description FROMProduct WHERE ProductID = 2 VS (with query param ) DECLARE @P1 int SET @P1 = 2 SELECT Id, Description FROMProduct WHERE ProductID = @P1 CF then uses a stored procedure spprepexec to try to force the dbms to precompile the sql statement into an execution plan for faster execution on subsequent calls. This is where you lose performance often. If your database does not have enough memory to store all of the prepared statements you will be essentially running the query 2x every time you call it. Once to generate the execution plan once to actually run it. The same thing happens if the query is not called often enough. IE in the case of reports run infrequently. The database will clear the execution plan for your query since it is not used often to make room for other queries. I would recommend writing a custom tag to replace cfqueryparam when used with infrequent long running reports. A query that takes 100 ms to run, is no big deal if it has to be recompiled once and a while. A query that runs for 3 minutes can be a major problem if it takes 2x as long 50% of the time. I wish Adobe would rewrite this functionality to take an optional parameter to specify whether to use sp prep exec. I've attached a custom tag I wrote to replace cfqueryparam in these cases. User beware it is not fully tested, and not as secure as cfqueryparam. -Original Message- From: Greg Luce [mailto:[EMAIL PROTECTED] Sent: Thursday, December 28, 2006 1:01 PM To: CF-Talk Subject: cfqueryparam DECREASES performance? OK, I must have something wrong here. I've only heard good things about cfqueryparam on this list for both security and performance. A client sent me an ugly report that times out for them. I spent an hour going through it and applying cfqueryparams to each variable in the many queries with appropriate datatypes. I threw a cfsetting tag in to increase the request timeout and the report runs in roughly about 512687 ms, restarted MSSQL server and CFMX7, then with the cfqueryparams the same query that was running in 5282ms in the old code, now takes 15094ms. Any ideas? ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265294 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Getting the value or innerHTML of an FCKEditor field using DO M
I ran into the same issue. This is used by a another window that is opened and updates that field. You could probably modify it to work for you. function getEditorContent(instanceName) { editor_frame = opener.document.getElementById(instanceName+'___Frame'); editor_source = editor_frame.contentWindow.document.getElementById('eEditorArea'); if (editor_source!=null) { return editor_source.contentWindow.document.body.innerHTML; } else { return ''; } } function setEditorContent(instanceName,newContent) { editor_frame = opener.document.getElementById(instanceName+'___Frame'); editor_source = editor_frame.contentWindow.document.getElementById('eEditorArea'); if (editor_source!=null) { editor_source.contentWindow.document.body.innerHTML = newContent; } else { return ''; } } -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Friday, December 29, 2006 2:32 AM To: CF-Talk Subject: Re: Getting the value or innerHTML of an FCKEditor field using DO M What does Firebug show it as? This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Andy Matthews To: CF-Talk Sent: Thu Dec 28 19:29:03 2006 Subject: Getting the value or innerHTML of an FCKEditor field using DOM I thought this would be fairly straightforward but it appears to be causing me some distress. I need to get the value of an FCKEditor field for transmission using AJAX. However, when I reference the fields ID, I get a blank result when there is definitely content in it. Can someone shed some light on this for me? Below is the HTML that is generated when I instantiate the FCKEditor. div input type=hidden id=art_article name=art_article value= style=display:none / input type=hidden id=art_article___Config value= style=display:none / iframe id=art_article___Frame src=/admin/includes/fckeditor/editor/fckeditor.html?InstanceName=art_ar ticl eamp;Toolbar=SmallSet width=100% height=250 frameborder=no scrolling=no/iframe /div Any ideas? !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265295 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Getting the value or innerHTML of an FCKEditor field using DOM
I ran into the same issue. Here are a couple javascript functions used by another window that is opened and updates that field. You could probably modify it to work for you. function getEditorContent(instanceName) { editor_frame = opener.document.getElementById(instanceName+'___Frame'); editor_source = editor_frame.contentWindow.document.getElementById('eEditorArea'); if (editor_source!=null) { return editor_source.contentWindow.document.body.innerHTML; } else { return ''; } } function setEditorContent(instanceName,newContent) { editor_frame = opener.document.getElementById(instanceName+'___Frame'); editor_source = editor_frame.contentWindow.document.getElementById('eEditorArea'); if (editor_source!=null) { editor_source.contentWindow.document.body.innerHTML = newContent; } else { return ''; } } This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265296 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfqueryparam DECREASES performance?
MSSQL 2000 Data direct driver 3.4 with the standard jdbc.sqlserver.SQLServerDriver. -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, December 29, 2006 7:33 AM To: CF-Talk Subject: Re: cfqueryparam DECREASES performance? Porter, Benjamin L. wrote: SELECT Id, Description FROM Product WHERE ProductID = 2 VS (with query param ) DECLARE @P1 int SET @P1 = 2 SELECT Id, Description FROM Product WHERE ProductID = @P1 CF then uses a stored procedure spprepexec to try to force the dbms to precompile the sql statement into an execution plan for faster execution on subsequent calls. With which driver did you observe this behaviour? For which version of MS SQL Server was that? ISTM that a more efficient approach would be to use sp_executesql or SQLPrepare and I am surprised that a driver would choose a strategy that would force an execution for every recompile. Jochem ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265300 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: user accounts and passwords
Use something other than the email address as the username. Offer to mail them their username if they forget it and enter their email address. Then the drunken co-eds would need to know a user name in order to mess with them. Or only allow one reset per week / day / month etc. Make them call someone to have it happen more often. -Original Message- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 9:56 AM To: CF-Talk Subject: Re: user accounts and passwords actually i have just thought of something that could happen with this method. My target audience are students at university. If someone has forgot their password and the system is designed for them to enter their email address, it will reset their password and send them the new password - then i was thinking that some students may get drunk and find it funny to keep entering their friends email addresses (or people they don't like) and continue to get them reset. do you guys use any way to get round this problem - maybe asking them a security question or something like before resetting their password thanks ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264616 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Mock Objects for ColdFusion
Do we need a EasyMock for CF or CFMock version of JMock now? -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Monday, December 04, 2006 12:55 PM To: CF-Talk Subject: Re: Mock Objects for ColdFusion Jeff, At this point there really isn't a *mock object* solution, per se for CF developers in the form of any particular framework developed to create Mocks. Really, the simplest way at this point is to create them by hand. Also, are you sure you want mock objects that will fully behave like Reactor or do you just want to stub out that layer to satisfy the Reactor dependencies? I just ask this because mocks are a perhaps the most difficult, tedious and brittle form of stubbing out a component or set of components. If you have already considered a simpler approach and decided you need mock objects, then nevermind. Otherwise, I recommend you do. Paul Paul, I have two cases (beyond the Mach-II objects) that I am running into issues on. First is with my data access layer and the objects that sit right on top of Reactor. I have an enrollment object which accepts form data from an enrollment application, validates that form data, then creates an enrollmentRecord from Reactor and saves it. How would you test this type of object? The second case is dealing with a web service. The web service acts as a gateway and takes three parameters - the name of the object for it to create, the method on that object to create, and the parameters (struct) to pass to that object. In other words, based upon the parameters passed to the web service, it will perform different functions and return different data. So, how do you test the object that makes use of this web service ... in other words, how do you stub or create a mock object for the web service since its functionality is so fluid? Thanks. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262792 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF Licensing
yes -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Thursday, November 09, 2006 9:56 AM To: CF-Talk Subject: CF Licensing Does CF licensing allow you to install CF Pro on two machines? One for development and one for production? If I remember right if you don't put a key in on install it goes into development mode, but you can only run one web site or was it you can only run pages with the loop back ip 127.0.0.1... I need to develop on an internal server that can run many web sites and I need to run a production server. Do I need two licenses? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259769 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: select * (star) caching
No but I suspect it has more to do with the way execution plans are cached on the database server than caching in cf. And cfqueryparam was around in 4.5 -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Thursday, September 28, 2006 5:15 PM To: CF-Talk Subject: RE: select * (star) caching This problem existed prior to CFMX, so its not CFQUERYPARAM related. Snake -Original Message- From: Porter, Benjamin L. [mailto:[EMAIL PROTECTED] Sent: 28 September 2006 18:08 To: CF-Talk Subject: RE: select * (star) caching Ask for them all by name. That is not a good reason. It does not let anyone else reading your code know what you are doing. I am not sure if this is a coldfusion problem or the fact that if you use cfqueryparam the db driver uses sp_prepexec on SQL servers which caches an execution plan for the query, and uses bind variables. This may cause SQL server to return the exact same results for the query even if the table structure changes. Again the right way to deal with this is to not use SELECT * ever. -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 27, 2006 2:20 PM To: CF-Talk Subject: RE: select * (star) caching How about if you need all the columns? -Original Message- From: Porter, Benjamin L. [mailto:[EMAIL PROTECTED] Sent: 27 September 2006 19:19 To: CF-Talk Subject: RE: select * (star) caching This is a known issue. For best practices you should never use select *. There is no good business or coding reason to do so, it should be transparent what data you are asking for. I'm not sure if flushing the template cache will correct this. It is simple enough to test in a dev environment. -Original Message- From: Brent Shaub [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 27, 2006 12:57 PM To: CF-Talk Subject: select * (star) caching Is this new to CF 7? I've got a handful of select * queries that when I modify the underlying table, the results do not include the new column(s). If this is a known issue, how can I refresh the cache for CF to pull the new fields? Since I inherited the app, listing all the columns and ideally reviewing which columns are needed (which is further time-consuming since many queries are in reused .cfcs) would be less than ideal. As part of new development rollouts, I'd just flush the cache after changing the database. Thanks in advance, Brent ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254731 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: select * (star) caching
Ask for them all by name. That is not a good reason. It does not let anyone else reading your code know what you are doing. I am not sure if this is a coldfusion problem or the fact that if you use cfqueryparam the db driver uses sp_prepexec on SQL servers which caches an execution plan for the query, and uses bind variables. This may cause SQL server to return the exact same results for the query even if the table structure changes. Again the right way to deal with this is to not use SELECT * ever. -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 27, 2006 2:20 PM To: CF-Talk Subject: RE: select * (star) caching How about if you need all the columns? -Original Message- From: Porter, Benjamin L. [mailto:[EMAIL PROTECTED] Sent: 27 September 2006 19:19 To: CF-Talk Subject: RE: select * (star) caching This is a known issue. For best practices you should never use select *. There is no good business or coding reason to do so, it should be transparent what data you are asking for. I'm not sure if flushing the template cache will correct this. It is simple enough to test in a dev environment. -Original Message- From: Brent Shaub [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 27, 2006 12:57 PM To: CF-Talk Subject: select * (star) caching Is this new to CF 7? I've got a handful of select * queries that when I modify the underlying table, the results do not include the new column(s). If this is a known issue, how can I refresh the cache for CF to pull the new fields? Since I inherited the app, listing all the columns and ideally reviewing which columns are needed (which is further time-consuming since many queries are in reused .cfcs) would be less than ideal. As part of new development rollouts, I'd just flush the cache after changing the database. Thanks in advance, Brent ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254673 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inner Join Across Two Data Sources?
You can create Linked servers in ms sql. I'm not sure if you could do that to a fox pro database. The caveat is linked severs suck performance wise. You could use query of queries in cold fusion to accomplish your task, however be careful that the original two query record sets are not so large that they crash cf. -Original Message- From: Aaron Rouse [mailto:[EMAIL PROTECTED] Sent: Thursday, September 28, 2006 11:52 AM To: CF-Talk Subject: Re: Inner Join Across Two Data Sources? How do you setup the link between MS SQL and FoxPro? Seems like that is the only way that could be done in a single query. On 9/28/06, Andy Matthews [EMAIL PROTECTED] wrote: Should be able to. Reference the fields like so: SELECT dt.fieldname FROM database1.table1 d1t1 INNER JOIN database2.table1 d2t1 ON d2t1.id = d2t1.id !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Tim Claremont [mailto:[EMAIL PROTECTED] Sent: Thursday, September 28, 2006 11:15 AM To: CF-Talk Subject: Inner Join Across Two Data Sources? I have two databases. One is in SQL Server, and the other is in FoxPro. Can I perform a single CFQUERY that includes one table in each data source and joins the two based on say... ClientNum? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254676 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: select * (star) caching
This is a known issue. For best practices you should never use select *. There is no good business or coding reason to do so, it should be transparent what data you are asking for. I'm not sure if flushing the template cache will correct this. It is simple enough to test in a dev environment. -Original Message- From: Brent Shaub [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 27, 2006 12:57 PM To: CF-Talk Subject: select * (star) caching Is this new to CF 7? I've got a handful of select * queries that when I modify the underlying table, the results do not include the new column(s). If this is a known issue, how can I refresh the cache for CF to pull the new fields? Since I inherited the app, listing all the columns and ideally reviewing which columns are needed (which is further time-consuming since many queries are in reused .cfcs) would be less than ideal. As part of new development rollouts, I'd just flush the cache after changing the database. Thanks in advance, Brent ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254460 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4