Re: How to loop over a dataset twice.
I am trying to loop over a dataset twice. I am trying using CFLOOP but the 2nd CFLOOP will not process. And I'm willing to bet that whatever you're doing, you can do it in one loop, too :) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334403 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to loop over a dataset twice.
And I'm willing to bet that whatever you're doing, you can do it in one loop, too :) 100% agree. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334404 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to loop over a dataset twice.
..and if you can't you should probably be using 2 different queries. Jim Eisenhauer On Wed, Jun 9, 2010 at 5:46 AM, Michael Grant mgr...@modus.bz wrote: And I'm willing to bet that whatever you're doing, you can do it in one loop, too :) 100% agree. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334405 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
32-bit / 64-bit COM object issues in ColdFusion 9
We're in the process of upgrading a client site from ColdFusion MX 7 on Windows 2003 to ColdFusion 9 on Windows 2008. For the most part, everything's gone smoothly, but we're having issues with a COM object they've been using since before we took over management of their site in 2005. The error we get is: An exception occurred when instantiating a COM object. The cause of this exception was that: java.lang.RuntimeException: Can not use native code: Initialisation failed. In scouring the 'net for almost 8 hours yesterday I found a few posts on message boards or in comments on blogs which claim that ColdFusion 9 running in 64-bit will not work with a 32-bit COM object. But I've picked through the Adobe site and haven't been able to find any concrete proof of this. If this is in fact true, it's going to cause a whole host of headaches and additional costs for the client, so I'm looking for some confirmation. Can anyone confirm this is the case, or -- even better -- provide a link to someplace where Adobe confirms it? Thanks in advance! -laurie ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334406 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Query of queries question
HI All - I have a query which returns the result set like below. The column names are like 1990, 1991, 1992 and there are certain amount for each year 1990 1991 1992 1000 5000 6000 2000 2000 3000 I have a query of query which finds the sum of the amounts for year 1990, and I use the query like Select SUM(1990), it returns the sum of 1990+1990. How to make sure that 1990 is recognized as a column instead as a number. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334407 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Want Help with cffileupload .swf Not Loading w/Non-URL Accessible CFIDE
Anyone figure out how to make this work just using CFML and/or changing Administrator configuration? I've Tried: 1. cjajaximport scriptsrc=/cfscripts// where cfscripts is a copy everything in CFIDE/scripts. 2. CF Adminstrator Server Settings Settings Default ScriptSrc Directory What I'm seeing through Firebug is the JavaScript file (/ajax/package/cffileupload_swf.js) responsible for loading the cffileupload SWF always looks in: /CFIDE/scripts/ajax/resources/cf/assets/MultiFileUpload.swf The solution I've been able to come up with thus far is editing cffileupload_swf.js to change the following line to point at the new location: defaultSWFLocation=/CFIDE/scripts/ajax/resources/cf/assets/MultiFileUpload.swf; ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334408 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
Should be double quotes I think Select SUM(1990) Some DBs use brackets too I think sum([1990]) Not sure how it would work undr the hood with query of query, can't you pull this from the db directly? On Wed, 2010-06-09 at 11:27 -0400, fun and learning wrote: HI All - I have a query which returns the result set like below. The column names are like 1990, 1991, 1992 and there are certain amount for each year 1990 1991 1992 1000 5000 6000 2000 2000 3000 I have a query of query which finds the sum of the amounts for year 1990, and I use the query like Select SUM(1990), it returns the sum of 1990+1990. How to make sure that 1990 is recognized as a column instead as a number. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334409 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
SUM([1990]) Just use square brackets around column name. On Wed, Jun 9, 2010 at 11:27 AM, fun and learning funandlrnn...@gmail.comwrote: HI All - I have a query which returns the result set like below. The column names are like 1990, 1991, 1992 and there are certain amount for each year 1990 1991 1992 1000 5000 6000 2000 2000 3000 I have a query of query which finds the sum of the amounts for year 1990, and I use the query like Select SUM(1990), it returns the sum of 1990+1990. How to make sure that 1990 is recognized as a column instead as a number. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334410 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
Your first issue is that that is not a good db practice naming columns as numbers. If you put a prefix of y in front of the column name in your table (or whatever you chose, i.e y1990, y1991, y1992) it wouldn't have this issue, it would force your SQL to actual look for a table column rather than just summing the number you entered. In some databases you can force the issue by surrounding the column header in quotations (Sum('1990')) but you cannot count on that, you are better off renaming your column headers as I said earlier. Jim Eisenhauer On Wed, Jun 9, 2010 at 8:27 AM, fun and learning funandlrnn...@gmail.comwrote: HI All - I have a query which returns the result set like below. The column names are like 1990, 1991, 1992 and there are certain amount for each year 1990 1991 1992 1000 5000 6000 2000 2000 3000 I have a query of query which finds the sum of the amounts for year 1990, and I use the query like Select SUM(1990), it returns the sum of 1990+1990. How to make sure that 1990 is recognized as a column instead as a number. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334411 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF8 Component/Cfinvoke performance
Hello all, I am having an issue where I have created a Book CFC that is taking way too long to cfinvoke. I had to convert it to a cffunction to get the permformance I needed. The cfc lived in the directory of the template path being used for the cfinvoke, so I assumed that was a relatively efficient way to do it? What can I look at that would affect the component invoking speed ? Is there any way not to have to cfinvoke so many times, and cache/reuse the component structure in mem and just put the current data in it (and not cfinvoke alot ) ? I am not explicity tearing down the structures, just doing cfinvokes in loops with new book isbn's etc. I am a cfcomponent newbie, so be gentle.. :) I would really not have to use functions, and be able to make calls to this remotely, but I am at a loss where to change it. It performs fine as a function, just not as a component. Any ideas appreciated. Thanks, Bob ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334412 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
Your first issue is that that is not a good db practice naming columns as numbers. If you put a prefix of y in front of the column name in your table (or whatever you chose, i.e y1990, y1991, y1992) it wouldn't have this issue, it would force your SQL to actual look for a table column rather than just summing the number you entered. In some databases you can force the issue by surrounding the column header in quotations (Sum('1990')) but you cannot count on that, you are better off renaming your column headers as I said earlier. Jim Eisenhauer On Wed, Jun 9, 2010 at 8:27 AM, fun and learning funandlrnn...@gmail.comwrote: I get the following error when I use quotes Query Of Queries syntax error. Encountered SUM. Lexical error at line 0, column 0. Encountered: \ (34), after : and the following error when I use brackets Query Of Queries syntax error. Encountered SUM ( [. Incorrect Select List ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334413 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
Ah, right QoQ can be bitchy. Can't you alias the column names in the initial query? SELECT my1990 = [1990], my1991 = [1991] or SELECT [1990] as my1990 etc etc That way can reference them without any issues. P.S. 1990 and the like are absolutely horrible column names. On Wed, Jun 9, 2010 at 11:41 AM, fun and learning funandlrnn...@gmail.comwrote: Your first issue is that that is not a good db practice naming columns as numbers. If you put a prefix of y in front of the column name in your table (or whatever you chose, i.e y1990, y1991, y1992) it wouldn't have this issue, it would force your SQL to actual look for a table column rather than just summing the number you entered. In some databases you can force the issue by surrounding the column header in quotations (Sum('1990')) but you cannot count on that, you are better off renaming your column headers as I said earlier. Jim Eisenhauer On Wed, Jun 9, 2010 at 8:27 AM, fun and learning funandlrnn...@gmail.com wrote: I get the following error when I use quotes Query Of Queries syntax error. Encountered SUM. Lexical error at line 0, column 0. Encountered: \ (34), after : and the following error when I use brackets Query Of Queries syntax error. Encountered SUM ( [. Incorrect Select List ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334414 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF8 Component/Cfinvoke performance
Did you use something like cfinvoke component=foo method=goo returnVariable=result ? If so, then you are recreating the component on each request. You can, and probably should, store the CFC one time in a persistant scope. Your Application.cfc's onApplicationStart could do something like this: cfset application.foo = createObject(component, foo) Then your CFC can do: cfinvoke component=#application.foo# method=goo returnVariable=reuslt or cfset result = application.foo.goo() On Wed, Jun 9, 2010 at 10:33 AM, Robert Bell bobert.b...@gmail.com wrote: Hello all, I am having an issue where I have created a Book CFC that is taking way too long to cfinvoke. I had to convert it to a cffunction to get the permformance I needed. The cfc lived in the directory of the template path being used for the cfinvoke, so I assumed that was a relatively efficient way to do it? What can I look at that would affect the component invoking speed ? Is there any way not to have to cfinvoke so many times, and cache/reuse the component structure in mem and just put the current data in it (and not cfinvoke alot ) ? I am not explicity tearing down the structures, just doing cfinvokes in loops with new book isbn's etc. I am a cfcomponent newbie, so be gentle.. :) I would really not have to use functions, and be able to make calls to this remotely, but I am at a loss where to change it. It performs fine as a function, just not as a component. Any ideas appreciated. Thanks, Bob ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334415 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CF8 Component/Cfinvoke performance
If you are using cfinvoke it will re-instantiate the component each call unless you return the component as a variable. I would be more inclined to use the following only because I think it is neater. cfset object = createObject('component', 'componentCFC').init() / !--- the init function needs to have return this --- This then gets a handle to the object and you can use multiple calls like this. cfset object.method1() / cfset object.method2() / cfset object.method3() / cfset object.method4() / In a single page, and it will be a lot faster. You can do the same with cfinvoke to return the object, but like I said the code sample I gave is much neater in my opinion. -Original Message- From: Robert Bell [mailto:bobert.b...@gmail.com] Sent: Thursday, 10 June 2010 1:34 AM To: cf-talk Subject: CF8 Component/Cfinvoke performance Hello all, I am having an issue where I have created a Book CFC that is taking way too long to cfinvoke. I had to convert it to a cffunction to get the permformance I needed. The cfc lived in the directory of the template path being used for the cfinvoke, so I assumed that was a relatively efficient way to do it? What can I look at that would affect the component invoking speed ? Is there any way not to have to cfinvoke so many times, and cache/reuse the component structure in mem and just put the current data in it (and not cfinvoke alot ) ? I am not explicity tearing down the structures, just doing cfinvokes in loops with new book isbn's etc. I am a cfcomponent newbie, so be gentle.. :) I would really not have to use functions, and be able to make calls to this remotely, but I am at a loss where to change it. It performs fine as a function, just not as a component. Any ideas appreciated. Thanks, Bob ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334416 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion and .NET Web Services running WSE 3.0
I've committed to SVN the bare essentials to make a WS-Security call. Documentation will follow tomorrow. http://wss4cf.riaforge.org/ mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 8 June 2010 04:00, Paul Alkema paulalkemadesi...@gmail.com wrote: James, I too have had issue connecting to Exact Target's poorly documented API. I did manage to figure out how to add a user via an older API though. http://paulalkema.com/post.cfm/how-to-subscribe-a-user-in-exact-target-via-t heir-api Regards, Paul Alkema -Original Message- From: Dan O'Keefe [mailto:dan.oke...@gmail.com] Sent: Sunday, June 06, 2010 2:36 PM To: cf-talk Subject: Re: ColdFusion and .NET Web Services running WSE 3.0 James, I would be interested in participating on this as well as I have a current need for the WS-Security piece with ExactTarget API. Dan On Sat, Jun 5, 2010 at 7:13 AM, James Holmes james.hol...@gmail.com wrote: OK, I'll finish up the webservice wrapper CFC on which I'm working and then look at what's necessary to add the digest password type (currently I just have the text type working) and any other parts of WS-Security that are possible in CF. The code will work in CF8 and higher, although parts of it will probably work in CF7 (since that's when we got addSoapRequestHeader()). mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 5 June 2010 21:15, Phillip Duba phild...@gmail.com wrote: James, I know I will definitely need something like that in the future. While this project went the .NET route, there are two follow-on projects that will most likely be needed, one requested by my group, so I know I'll be working on at least one more integration using WS-Securit. Thanks, Phil On Sat, Jun 5, 2010 at 8:12 AM, James Holmes james.hol...@gmail.com wrote: Coincidentally, I've just finished developing the code necessary to do a basic WS-SECURITY call in CF, using standard cf webservices code (i.e. no extra Java jars or other external dependencies). If people need this sort of thing, let me know because I'm thinking of starting an open source project to flesh it out. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 5 June 2010 01:04, Phillip Duba phild...@gmail.com wrote: It did for the pure web services, not for the HTTP Post method (not recommended for production). It was a proof-of-concept under a tight deadline so I didn't have time to follow the web service all the way to the conclusion I would need for production. I did find a few blog posts that got me pointed in the direction I probably needed to go. The specific implementation was the Username Token profile. I eventually got to receiving an error of cannot authorize/validate the username token. It probably had to do with timestamps and the makeup of the token itself. Again, I just ran out of time and the project was chosen to be done by another organization internally doing .NET work for which the WS-Security implementation was seamless using MS's WSE library. It wasn't the deciding factor, but it was definitely a differentiator, Phil On Fri, Jun 4, 2010 at 12:53 PM, Dan O'Keefe dan.oke...@gmail.com wrote: Philip, Did you authorization require WS-Security? Dan -- Dan O'Keefe On Thu, Apr 29, 2010 at 12:13 PM, Phillip Duba phild...@gmail.com wrote: Dave, thanks for the response. I've gone to executing the request using CFHTTP, creating the soap:Header tag and building it as I go through the WSE spec and examples. I've gotten to the point that I get unauthorized so that's where I'm at now. I may have to use CFHTTP to do it, but we'll see. Thanks again, Phil ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334417 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: 32-bit / 64-bit COM object issues in ColdFusion 9
Laurie, You will need a 64bit version of the COM. Moreover, Win2003 to Win2008 is a fairly substantial move where COM is largely deprecated in favor of .NET. -Mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Laurie Carr [mailto:lc...@d2creative.com] Sent: Wednesday, June 09, 2010 9:33 AM To: cf-talk Subject: 32-bit / 64-bit COM object issues in ColdFusion 9 We're in the process of upgrading a client site from ColdFusion MX 7 on Windows 2003 to ColdFusion 9 on Windows 2008. For the most part, everything's gone smoothly, but we're having issues with a COM object they've been using since before we took over management of their site in 2005. The error we get is: An exception occurred when instantiating a COM object. The cause of this exception was that: java.lang.RuntimeException: Can not use native code: Initialisation failed. In scouring the 'net for almost 8 hours yesterday I found a few posts on message boards or in comments on blogs which claim that ColdFusion 9 running in 64-bit will not work with a 32-bit COM object. But I've picked through the Adobe site and haven't been able to find any concrete proof of this. If this is in fact true, it's going to cause a whole host of headaches and additional costs for the client, so I'm looking for some confirmation. Can anyone confirm this is the case, or -- even better -- provide a link to someplace where Adobe confirms it? Thanks in advance! -laurie ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334418 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
UPS calculator
Does anyone know of a Coldfusion UPS calculator. We have weight, from address and to address. looking to get the cost to ship ground. thank you in advance. Matt Friedman ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334419 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: UPS calculator
Have you looked at the UPS API? https://www.ups.com/upsdeveloperkit?loc=en_US Wil Genovese One man with courage makes a majority. -Andrew Jackson A fine is a tax for doing wrong. A tax is a fine for doing well. On Jun 9, 2010, at 12:06 PM, Matthew Friedman wrote: Does anyone know of a Coldfusion UPS calculator. We have weight, from address and to address. looking to get the cost to ship ground. thank you in advance. Matt Friedman ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334420 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
GoGrid Experiences?
We're thinking about setting up a CF8 Development Server in the cloud at GoGrid and would love to know any experiences with GoGrid, good or bad. Thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334421 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: 32-bit / 64-bit COM object issues in ColdFusion 9
In scouring the 'net for almost 8 hours yesterday I found a few posts on message boards or in comments on blogs which claim that ColdFusion 9 running in 64-bit will not work with a 32-bit COM object. But I've picked through the Adobe site and haven't been able to find any concrete proof of this. If this is in fact true, it's going to cause a whole host of headaches and additional costs for the client, so I'm looking for some confirmation. Can anyone confirm this is the case, or -- even better -- provide a link to someplace where Adobe confirms it? I can't provide a link, but I can confirm it. Your best bet is probably to just install the 32-bit version of CF on your Windows server. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsit ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334422 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
If you can't rename the columns as someone else suggested, you can change your select to select 1990 as y1990, 1991 as y1991, etc.. then in your query of querys you do select sum(y1990) as sum1990 On Wed, Jun 9, 2010 at 8:27 AM, fun and learning funandlrnn...@gmail.com wrote: HI All - I have a query which returns the result set like below. The column names are like 1990, 1991, 1992 and there are certain amount for each year 1990 1991 1992 1000 5000 6000 2000 2000 3000 I have a query of query which finds the sum of the amounts for year 1990, and I use the query like Select SUM(1990), it returns the sum of 1990+1990. How to make sure that 1990 is recognized as a column instead as a number. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334423 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: UPS calculator
On Wed, Jun 9, 2010 at 1:06 PM, Matthew Friedman m...@hozgroup.com wrote: Does anyone know of a Coldfusion UPS calculator. We have weight, from address and to address. See if this might help you out... http://cfups.riaforge.org/ -Cameron -- Cameron Childress Sumo Consulting Inc http://www.sumoc.com --- cell: 678.637.5072 aim: cameroncf email: camer...@gmail.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334424 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF8 Component/Cfinvoke performance
I am doing: cfinvoke compenent =Book method=init returnvariable=my_book cfinvokearguemnt /cfinvoke Thanks, I will try that, and see if it works better. Did you use something like cfinvoke component=foo method=goo returnVariable=result /cfinvoke ? If so, then you are recreating the component on each request. You can, and probably should, store the CFC one time in a persistant scope. Your Application.cfc's onApplicationStart could do something like this: cfset application.foo = createObject(component, foo) Then your CFC can do: cfinvoke component=#application.foo# method=goo returnVariable=reuslt or cfset result = application.foo.goo() ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334425 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
Ah, right QoQ can be bitchy. Can't you alias the column names in the initial query? SELECT my1990 = [1990], my1991 = [1991] or SELECT [1990] as my1990 etc etc That way can reference them without any issues. P.S. 1990 and the like are absolutely horrible column names. On Wed, Jun 9, 2010 at 11:41 AM, fun and learning funandlrnn...@gmail.comwrote: Thanks you all for the replies. Prepending a variable before the year helped me ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334426 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: 32-bit / 64-bit COM object issues in ColdFusion 9
Mark is correct. This is not a CF limitation but a part of Windows, which is probably why you're finding the info on the Adobe site. 32-bit DLLs will not load in a 64-bit process. You can run a 32-bit IIS process on Windows 2008 x64 alongside x64 IIS processes but you will also have to run 32-bit CF as well for the 32-bit IIS process. Laurie, You will need a 64bit version of the COM. Moreover, Win2003 to Win2008 is a fairly substantial move where COM is largely deprecated in favor of .NET. -Mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com We're in the process of upgrading a client site from ColdFusion MX 7 on Windows 2003 to ColdFusion 9 on Windows 2008. For the most part, everything's gone smoothly, but we're having issues with a COM object they've been using since before we took over management of their site in 2005. The error we get is: An exception occurred when instantiating a COM object. The cause of this exception was that: java.lang.RuntimeException: Can not use native code: Initialisation failed. In scouring the 'net for almost 8 hours yesterday I found a few posts on message boards or in comments on blogs which claim that ColdFusion 9 running in 64-bit will not work with a 32-bit COM object. But I've picked through the Adobe site and haven't been able to find any concrete proof of this. If this is in fact true, it's going to cause a whole host of headaches and additional costs for the client, so I'm looking for some confirmation. Can anyone confirm this is the case, or -- even better -- provide a link to someplace where Adobe confirms it? Thanks in advance! -laurie ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334427 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Avoiding SQL deadlocks
My understanding and experience is that a well-architected application should NEVER experience a SQL deadlock. If I am incorrect in this premise, please let me know. Based on that assumption, I'm trying to diagnose a client's deadlock problem. They are a new client. I have a copy of their code and a copy of the error, but don't have access to their SQL Server 2005 database. I'm told the database has no stored procedures, no functions, triggers, or external jobs running on it, but I suppose that information is wrong. They have 3 pages with cftransaction around some code. It appears that this is the code that's throwing this sort of error: Error,jrpp-717,06/09/10,13:47:16,SomeSiteName,Error Executing Database Query.[Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 187) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. The specific sequence of files included or processed is: C:\Inetpub\wwwroot\SomeSiteName\index.cfm, line: 270 The error isn't actually in index.cfm but I can deduce what page it's on as the site isn't very large and there aren't many queries around line 270 of any pages. I tried setting the isolation level to serializable, thinking that would bypass the deadlocks. However, they're still happening. If there's nothing else hitting the databases, and if the queries are simple inserts/updates, should there still be deadlocks? Thanks, - Andrew. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334428 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Solr and CF8
We'd like to install Solr for use by ColdFusion 8. Can it coexist with Verity? Is there a tutorial for installing it? Any caveats? Thanks in advance. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334429 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
SQL deadlocks
(my apologies if this gets posted twice, but the first one didn't seem to go through.) My understanding and experience is that a well-architected application should NEVER experience a SQL deadlock. If I am incorrect in this premise, please let me know. Based on that assumption, I'm trying to diagnose a client's deadlock problem. They are a new client. I have a copy of their code and a copy of the error, but don't have access to their SQL Server 2005 database. I'm told the database has no stored procedures, no functions, triggers, or external jobs running on it, but I suppose that information is wrong. I'm getting this error: Error,jrpp-717,06/09/10,13:47:16,SomeSiteName,Error Executing Database Query.[Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 187) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. The specific sequence of files included or processed is: C:\Inetpub\wwwroot\SomeSiteName\index.cfm, line: 126 There were three existing uses of cftransaction on the site, and I've temporarily set them all to serializabile. I also had the client show me everywhere this particular table is written to (insert/update/delete) and have put a serializable cftransaction around that code. If this is the only code writing to this table, should I still be getting transaction deadlocks? Thanks, - Andrew. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334430 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: UPS calculator
I'm assuming you didn't search RIAForge? http://cfups.riaforge.org/ On Wed, Jun 9, 2010 at 12:06 PM, Matthew Friedman m...@hozgroup.com wrote: Does anyone know of a Coldfusion UPS calculator. We have weight, from address and to address. looking to get the cost to ship ground. thank you in advance. Matt Friedman ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334431 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of queries question
I have a query which returns the result set like below. The column names are like 1990, 1991, 1992 and there are certain amount for each year 1990 1991 1992 1000 5000 6000 2000 2000 3000 This doesn't address your question directly, but again this is a very poor database design. I strongly recommend that you learn how to design a normalized database schema. If you design your schema well, you won't run into the problems you're describing. Of course, if you're not responsible for the database design, or if you're building a query that presents a denormalized recordset from a normalized schema, feel free to disregard this. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334432 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: GoGrid Experiences?
GoGrid is a great company. I have nothing but good things to say about them. On Wed, Jun 9, 2010 at 10:17 AM, Richard Steele r...@photoeye.com wrote: We're thinking about setting up a CF8 Development Server in the cloud at GoGrid and would love to know any experiences with GoGrid, good or bad. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334433 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Problems with slashes in JSON
I can't figure this thing out for the life of me, and I know it's got to be something simple that I'm missing. Here's what I'm trying to do. I'm using jQuery to hit a CFC and return data. The CFC actually queries the database, loops through results and creates list items for each row. I then return the list items to jQuery, which populates my UL with them. Here's my problems and what I've done so far: * returning the data from my CFC as a string causes jQuery to actually display the html code in the brower, so I literally see liEric Cobb/li. * returning the data as JSON shows the list items correctly, but my page is littered with \\n\\t\\t\\t\\t at the end of every record. * I used a regex to clean up all of the line breaks, carriage returns, and tabs in my CFC before returning to jQuery and that works. * In every record that contains a slash / in the data, the slash has been replaced with \\\/. * Nothing I do can get rid of these slashes. I've tried RegEx, SerializeJSON(), and JSStringFormat() in CF, and a whole whoost of jQuery escape(), html(), text(), and replace() functions, and nothing works. I think my biggest problem is that I've staring at and fighting with this thing for too long. Here's my method: !--- get a list of all external customers for AJAX calls --- cffunction name=AJAXgetAllCustomers access=remote output=false returnformat=json !--- create a struct to hold our local variables. --- cfset var loc = structNew() !--- returns a query. --- cfset loc.custList = getAllCustomers() / cfsavecontent variable=loc.rtnContent cfoutput query=loc.custList li#Trim(loc.custList.full_name)# - #Trim(loc.custList.addr_line1)#, #Trim(loc.custList.city)#, #Trim(loc.custList.state)# /cfoutput /cfsavecontent !--- remove all line breaks, carriage returns, and tabs. --- cfset loc.rtnContent = ReReplace(loc.rtnContent,[#chr(10)#|#chr(13)#|#chr(9)#],,ALL) cfreturn SerializeJSON(Trim(loc.rtnContent)) /cffunction And here is my jQuery call: script type=text/javascript $(document).ready(function(){ $('#contentdiv').load('myCFC.cfc?method=AJAXgetAllCustomers'); }); /script So, can someone please tell me how to escape the characters so that I can get rid of the \\\/ in my display output? And while I'm on the subject, surely there has got to be a better way than having to manually escape every character individually that may cause problems. I shouldn't have to run regex and whatnot to make everything work. In my mind, SerializeJSON() (or returnformat=json for that matter) should have everything escaped and formatted nicely for jQuery, who should then know how to parse everything and display is correctly. Am I wrong? -- Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334434 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Solr and CF8
We'd like to install Solr for use by ColdFusion 8. Can it coexist with Verity? Is there a tutorial for installing it? Any caveats? Thanks in advance. You can install it, and it can coexist with Verity, but you won't be able to invoke it using CF's search tags. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334435 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Solr and CF8
Thanks Dave, Are there custom tags that can be used with Solr to take the place of CF search tags? We gave up on Verity as we had disappearing collections after adding a 5th instances in CF8 Enterprise. We'd like to install Solr for use by ColdFusion 8. Can it coexist with Verity? Is there a tutorial for installing it? Any caveats? Thanks in advance. You can install it, and it can coexist with Verity, but you won't be able to invoke it using CF's search tags. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334436 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Solr and CF8
Thanks Dave, Are there custom tags that can be used with Solr to take the place of CF search tags? We gave up on Verity as we had disappearing collections after adding a 5th instances in CF8 Enterprise. Solr is part of Lucene, so you will probably find useful things if you search for CF8 or CF7 and Lucene. I found these on Ray Camden's site: http://www.coldfusionjedi.com/index.cfm/2007/7/11/Remember-LINDEX-ColdFusion-integration-with-Lucene http://www.coldfusionjedi.com/index.cfm/2007/9/30/ColdFusion-Lucene-Test I would suggest you consider ditching software-based search entirely, and get a hardware-based solution like a Google Search Appliance or a Google Mini. That's what we switched to when we ditched Verity, and have been very happy. Of course, they're not free, but they're worth the money. We like them so much, we became a Google Enterprise partner! (So I guess I'm a little biased, but there you go.) Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334437 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: SQL deadlocks
Andrew, If by well-architected you mean an unlimited budget to purchase hardware and software then yes... you are correct :) But deadlocking is not just about good code and well designed schemas... it's also a scalability and cost issue. -mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Andrew Clarke [mailto:s...@clarke.ca] Sent: Wednesday, June 09, 2010 2:43 PM To: cf-talk Subject: SQL deadlocks (my apologies if this gets posted twice, but the first one didn't seem to go through.) My understanding and experience is that a well-architected application should NEVER experience a SQL deadlock. If I am incorrect in this premise, please let me know. Based on that assumption, I'm trying to diagnose a client's deadlock problem. They are a new client. I have a copy of their code and a copy of the error, but don't have access to their SQL Server 2005 database. I'm told the database has no stored procedures, no functions, triggers, or external jobs running on it, but I suppose that information is wrong. I'm getting this error: Error,jrpp-717,06/09/10,13:47:16,SomeSiteName,Error Executing Database Query.[Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 187) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. The specific sequence of files included or processed is: C:\Inetpub\wwwroot\SomeSiteName\index.cfm, line: 126 There were three existing uses of cftransaction on the site, and I've temporarily set them all to serializabile. I also had the client show me everywhere this particular table is written to (insert/update/delete) and have put a serializable cftransaction around that code. If this is the only code writing to this table, should I still be getting transaction deadlocks? Thanks, - Andrew. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334438 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Problems with slashes in JSON
In your cfsavecontent, get rid of all the tabs and carriage returns. This will make your code less readable, but it should take care of the problem you're having. So it might end up looking like this: cfsavecontent variable=loc.rtnContentcfoutput query=loc.custListli#Trim(loc.custList.full_name)# - #Trim(loc.custList.addr_line1)#, #Trim(loc.custList.city)#, #Trim(loc.custList.state)#/cfoutput/cfsavecontent -- Josh -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Wednesday, June 09, 2010 2:35 PM To: cf-talk Subject: Problems with slashes in JSON I can't figure this thing out for the life of me, and I know it's got to be something simple that I'm missing. Here's what I'm trying to do. I'm using jQuery to hit a CFC and return data. The CFC actually queries the database, loops through results and creates list items for each row. I then return the list items to jQuery, which populates my UL with them. Here's my problems and what I've done so far: * returning the data from my CFC as a string causes jQuery to actually display the html code in the brower, so I literally see liEric Cobb/li. * returning the data as JSON shows the list items correctly, but my page is littered with \\n\\t\\t\\t\\t at the end of every record. * I used a regex to clean up all of the line breaks, carriage returns, and tabs in my CFC before returning to jQuery and that works. * In every record that contains a slash / in the data, the slash has been replaced with \\\/. * Nothing I do can get rid of these slashes. I've tried RegEx, SerializeJSON(), and JSStringFormat() in CF, and a whole whoost of jQuery escape(), html(), text(), and replace() functions, and nothing works. I think my biggest problem is that I've staring at and fighting with this thing for too long. Here's my method: !--- get a list of all external customers for AJAX calls --- cffunction name=AJAXgetAllCustomers access=remote output=false returnformat=json !--- create a struct to hold our local variables. --- cfset var loc = structNew() !--- returns a query. --- cfset loc.custList = getAllCustomers() / cfsavecontent variable=loc.rtnContent cfoutput query=loc.custList li#Trim(loc.custList.full_name)# - #Trim(loc.custList.addr_line1)#, #Trim(loc.custList.city)#, #Trim(loc.custList.state)# /cfoutput /cfsavecontent !--- remove all line breaks, carriage returns, and tabs. --- cfset loc.rtnContent = ReReplace(loc.rtnContent,[#chr(10)#|#chr(13)#|#chr(9)#],,ALL) cfreturn SerializeJSON(Trim(loc.rtnContent)) /cffunction And here is my jQuery call: script type=text/javascript $(document).ready(function(){ $('#contentdiv').load('myCFC.cfc?method=AJAXgetAllCustomers'); }); /script So, can someone please tell me how to escape the characters so that I can get rid of the \\\/ in my display output? And while I'm on the subject, surely there has got to be a better way than having to manually escape every character individually that may cause problems. I shouldn't have to run regex and whatnot to make everything work. In my mind, SerializeJSON() (or returnformat=json for that matter) should have everything escaped and formatted nicely for jQuery, who should then know how to parse everything and display is correctly. Am I wrong? -- Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334439 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Avoiding SQL deadlocks
My understanding and experience is that a well-architected application should NEVER experience a SQL deadlock. If I am incorrect in this premise, please let me know. It's also my understanding and experience is that a well-architected application should NEVER experience bugs of any kind. :) A statement like that may seem safe since the mere existence of a deadlock (or a bug for that matter) could automatically disqualify it from the well-architected list, but honestly in my experience deadlocks more commonly come from the devil-in-the-details, not over-arching failures in system architecture. Based on that assumption, I'm trying to diagnose a client's deadlock problem. They are a new client. I have a copy of their code and a copy of the error, but don't have access to their SQL Server 2005 database. That kind of sucks. It's like me giving an Altas of everywhere I've driven to my mechanic and asking him to fix my car's occasional knocking noise without actually having the car. Due to deadlocks' evasive nature, I've found the best way to capture them is to duplicate them (preferably a staging environment) and analyze SQL traces to identify the database objects involved. I'm told the database has no stored procedures, no functions, triggers, or external jobs running on it, but I suppose that information is wrong. Unless your client has a reason to lie, I would assume that is probably true. They have 3 pages with cftransaction around some code. It appears that this is the code that's throwing this sort of error: Sounds like a good place to start. What tables are being touched in those transactions and in what order? The error isn't actually in index.cfm but I can deduce what page it's on as the site isn't very large and there aren't many queries around line 270 of any pages. Of course, it takes two to tango as well as deadlock. You need to know what the other process was. Was it also the code on line 270 of mysteryPage.cfm or another file entirely? I tried setting the isolation level to serializable, thinking that would bypass the deadlocks. Where? In your cfquery's? In the cftransaction tag? The default for the database? Either way, I'm not surprised if it didn't help. I have usually resolved most deadlocks by refactoring code in such a way that similar locked objects are always locked in the same order. Serializable isolation is enforced in MS SQL with range locks or table locks to eliminate phantom reads, and will probably have little to do with your situation other than lowering concurrency and therefore performance. However, they're still happening. If there's nothing else hitting the databases, and if the queries are simple inserts/updates, should there still be deadlocks? It doesn't take a complex system to create a deadlock if your good... er, unlucky. Your biggest problem now is the unknown. The best you can do with only the CF code is guess. Like I said before, many deadlocks occur when multiple places in your application are modifying the same objects in a different order within a transaction. i.e. page 1 updates records in table a, then table b while page 2 updates records in table b, then table a. Of course, deadlocks don't have to be between tables-- it could be pages in an index. That's why you REALLY need to have them run SQL Profiler and capture deadlocks and their related data. This will tell you the exact resources that in are involved in the error and prevent a lot of guesswork for you. They're really crippling you by asking you to solve this problem without the most critical piece (the database). The execution plan of the offending queries will be invaluable to seeing what is happening. Good luck. ~Brad ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334440 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Avoiding SQL deadlocks
Since there is no deadlock error until a deadlock exists, the error you reported is most likely the victim and not the culprit. Of course it could have caused it then the same page was hit again and reported the error. I'd have to think this would be FAR easier to debug from the DB server. management console, profiler etc. These can be a real pain to track down to say the least. .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Andrew Clarke [mailto:s...@clarke.ca] Sent: Wednesday, June 09, 2010 2:39 PM To: cf-talk Subject: Avoiding SQL deadlocks My understanding and experience is that a well-architected application should NEVER experience a SQL deadlock. If I am incorrect in this premise, please let me know. Based on that assumption, I'm trying to diagnose a client's deadlock problem. They are a new client. I have a copy of their code and a copy of the error, but don't have access to their SQL Server 2005 database. I'm told the database has no stored procedures, no functions, triggers, or external jobs running on it, but I suppose that information is wrong. They have 3 pages with cftransaction around some code. It appears that this is the code that's throwing this sort of error: Error,jrpp-717,06/09/10,13:47:16,SomeSiteName,Error Executing Database Query.[Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 187) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. The specific sequence of files included or processed is: C:\Inetpub\wwwroot\SomeSiteName\index.cfm, line: 270 The error isn't actually in index.cfm but I can deduce what page it's on as the site isn't very large and there aren't many queries around line 270 of any pages. I tried setting the isolation level to serializable, thinking that would bypass the deadlocks. However, they're still happening. If there's nothing else hitting the databases, and if the queries are simple inserts/updates, should there still be deadlocks? Thanks, - Andrew. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334441 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Avoiding SQL deadlocks
Since there is no deadlock error until a deadlock exists, the error you reported is most likely the victim and not the culprit. Of course it could have caused it then the same page was hit again and reported the error. In most CF applications with deadlocks that I've seen, the same code run concurrently is usually the cause of the deadlock. That is, there's a single script being run by multiple users, and that causes the deadlock. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334442 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Problems with slashes in JSON
Just a note that your list item has no closing tag. You can try building up the string with assignments rather than using cfsavecontent. i.e.: cfoutput query=loc.custList cfset local.result = local.result li#Trim(loc.custList.full_name)# - #Trim(loc.custList.addr_line1)#, #Trim(loc.custList.city)# #Trim(loc.custList.state)#/li / /cfoutput On Wed, Jun 9, 2010 at 6:54 PM, Josh Nathanson p...@oakcitygraphics.comwrote: In your cfsavecontent, get rid of all the tabs and carriage returns. This will make your code less readable, but it should take care of the problem you're having. So it might end up looking like this: cfsavecontent variable=loc.rtnContentcfoutput query=loc.custListli#Trim(loc.custList.full_name)# - #Trim(loc.custList.addr_line1)#, #Trim(loc.custList.city)#, #Trim(loc.custList.state)#/cfoutput/cfsavecontent -- Josh -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Wednesday, June 09, 2010 2:35 PM To: cf-talk Subject: Problems with slashes in JSON I can't figure this thing out for the life of me, and I know it's got to be something simple that I'm missing. Here's what I'm trying to do. I'm using jQuery to hit a CFC and return data. The CFC actually queries the database, loops through results and creates list items for each row. I then return the list items to jQuery, which populates my UL with them. Here's my problems and what I've done so far: * returning the data from my CFC as a string causes jQuery to actually display the html code in the brower, so I literally see liEric Cobb/li. * returning the data as JSON shows the list items correctly, but my page is littered with \\n\\t\\t\\t\\t at the end of every record. * I used a regex to clean up all of the line breaks, carriage returns, and tabs in my CFC before returning to jQuery and that works. * In every record that contains a slash / in the data, the slash has been replaced with \\\/. * Nothing I do can get rid of these slashes. I've tried RegEx, SerializeJSON(), and JSStringFormat() in CF, and a whole whoost of jQuery escape(), html(), text(), and replace() functions, and nothing works. I think my biggest problem is that I've staring at and fighting with this thing for too long. Here's my method: !--- get a list of all external customers for AJAX calls --- cffunction name=AJAXgetAllCustomers access=remote output=false returnformat=json !--- create a struct to hold our local variables. --- cfset var loc = structNew() !--- returns a query. --- cfset loc.custList = getAllCustomers() / cfsavecontent variable=loc.rtnContent cfoutput query=loc.custList li#Trim(loc.custList.full_name)# - #Trim(loc.custList.addr_line1)#, #Trim(loc.custList.city)#, #Trim(loc.custList.state)# /cfoutput /cfsavecontent !--- remove all line breaks, carriage returns, and tabs. --- cfset loc.rtnContent = ReReplace(loc.rtnContent,[#chr(10)#|#chr(13)#|#chr(9)#],,ALL) cfreturn SerializeJSON(Trim(loc.rtnContent)) /cffunction And here is my jQuery call: script type=text/javascript $(document).ready(function(){ $('#contentdiv').load('myCFC.cfc?method=AJAXgetAllCustomers'); }); /script So, can someone please tell me how to escape the characters so that I can get rid of the \\\/ in my display output? And while I'm on the subject, surely there has got to be a better way than having to manually escape every character individually that may cause problems. I shouldn't have to run regex and whatnot to make everything work. In my mind, SerializeJSON() (or returnformat=json for that matter) should have everything escaped and formatted nicely for jQuery, who should then know how to parse everything and display is correctly. Am I wrong? -- Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334443 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Avoiding SQL deadlocks
In a smaller app where there is only one piece of code that performs the actions that are causing deadlocks, sure. .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Wednesday, June 09, 2010 7:28 PM To: cf-talk Subject: Re: Avoiding SQL deadlocks Since there is no deadlock error until a deadlock exists, the error you reported is most likely the victim and not the culprit. Of course it could have caused it then the same page was hit again and reported the error. In most CF applications with deadlocks that I've seen, the same code run concurrently is usually the cause of the deadlock. That is, there's a single script being run by multiple users, and that causes the deadlock. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:33 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Avoiding SQL deadlocks
Even in a larger application if, for example, you are supported 150k users against a database. Say there is regular uniform logging going on - say search results or whatever. Whether the code is in different files or not if insert update queries are being run against the same tables you may suffer DB performance issues (including deadlocks). It's not wether the code is split - it's how the DB is being used and how much pressure is put on shared resources. Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Bobby Hartsfield [mailto:bo...@acoderslife.com] Sent: Wednesday, June 09, 2010 10:03 PM To: cf-talk Subject: RE: Avoiding SQL deadlocks In a smaller app where there is only one piece of code that performs the actions that are causing deadlocks, sure. .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Wednesday, June 09, 2010 7:28 PM To: cf-talk Subject: Re: Avoiding SQL deadlocks Since there is no deadlock error until a deadlock exists, the error you reported is most likely the victim and not the culprit. Of course it could have caused it then the same page was hit again and reported the error. In most CF applications with deadlocks that I've seen, the same code run concurrently is usually the cause of the deadlock. That is, there's a single script being run by multiple users, and that causes the deadlock. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334445 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
fckeditor and FW/1
Has anyone successfully used fckeditor and FW/1? Specifically the image uploader. I have a working version on my server in a Non-FW/1 site and it works great. I've copied over to my FW/1 sites and I'm getting the following error: The server didn't reply with a proper XML data. Please check your configuration. This happens when you click the image icon in the fckeditor and then click the button to browse the server. As I said, I have this working in non-FW/1 sites so I'm convinced that FW/1 is to blame. I think it probably has to do with path issues, but I can't figure out what path or where. My textarea is converted to the text editor correctly, its just the image upload that breaks. Thanks, Glenn ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334446 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: fckeditor and FW/1
I'm going to guess that you'll probably get a better and/or quicker answer on the FW/1 list. :-) http://groups.google.com/group/framework-one ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334447 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Junior ColdFusion Developer (Permanent-Houston, TX)
ColdFusion Developer (Houston) MisterArt.com (www.misterart.com) MisterArt.com is the world's largest online discount art supply store offering a wide selection of arts, crafts, books, and much more. Our inventory includes products for both the professional and amateur artist. With corporate headquarters located in the Montrose area of Houston, MisterArt.com has been a robust and successful enterprise since 1995. MisterArt.com provides an entrepreneurial, fast-paced business environment with a casual and collaborative atmosphere. We offer competitive compensation and an excellent benefit package including a comprehensive healthcare program and a 401k plan. Job Description The ideal candidate will be an enthusiastic, self motivated individual who will fill a Web Application Developer position at the Houston Headquarters and hold the following responsibilities: a.. Responsible for development and support of mission critical eCommerce systems b.. Deliver new functionality and change requests for existing applications c.. Participate in the ongoing development of applications that meet the needs of the company d.. Completes tasks on time with high quality. e.. Takes responsibility for issue resolution. Required Experience a.. ColdFusion 8 Application Development b.. Experience with OOP methodologies and extensive knowledge of CFCs c.. Deep Understanding and previous use of SQL, HTML, CSS, XML and Javascript correct syntax and hand coding d.. Database Design and Development (MS SQL Server) e.. 2 years of IT experience f.. Must be an effective communicator, both verbally and in written form Desired Experience a.. Experience with Java, Linux, Perl is preferred b.. Familiarity and experience with JSON is a bonus c.. Some background with SSRS preferred d.. Software development life cycle experience e.. Experience in eCommerce environment Application Instructions Interested potential candidates should send their resume, with a cover letter or note which includes salary requirements to lcit...@misterart.com MisterArt.com is an equal opportunity employer ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-jobs-talk/message.cfm/messageid:4328 Subscription: http://www.houseoffusion.com/groups/cf-jobs-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-jobs-talk/unsubscribe.cfm