Re: JQuery .ajax() call posts back to invoking page only on Production
For these sorts of this, I usually will turn on the Developer Tools panel in Chrome and watch the back/forth communication int he browser via the network tab. you can then click on any request's headers, response, etc. -Cameron Hi Cameron, I tried that based on your suggestion and didn't see any indication of back/forth communication. I liked how Chrome groups js and css activities together so I can see where to spend some time cleaning things up. I appreciate your suggestion. Fiddler 2 does a good job for showing the traffic and shows that the ajax requests complete successfully. It's that different behaviour of refreshing the page with querystring params after completing that I'm out to determine the cause. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350022 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
JQuery .ajax() call posts back to invoking page only on Production
Hello, thank you for any assistance with this puzzler. On my local Windows Vista development machine, I'm using CF 9. Here I have a JavaScript call JQuery's $.ajax() method to write some text to a database using a web service in a CFC. On my machine, it works as expected: writes the values, screen stays put. On production, a leased webserver with Hostek.com, something different happens. The .ajax() call accesses the CFC which writes to the database, then after about five seconds, refreshes the screen with the data passed into the CFC as querystring parameters. This page refresh is mucking up the purpose of using ajax. I haven't a clue why this behavior is server-specific nor if the area of research is Cold Fusion or the CF Admin settings or something else related to JQuery. I have debugging IPs turned off on both environments. Why does an ajax post turn into a get and refresh the URL after it's successful on production and not development? Thanks and hope it's an easy one Brent ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350011 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Strange form field behavior based on its name
Are out_start and out_end reserved keywords for form fields? I looked for documentation found no references. When I output their value after submission, they're get translated to {t '00:00:00'}. If name them out_xstart and out_xend, the proper date values show. Just an oddity to share. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332527 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Empty error message in a query of queries
Thanks for the replies Carl and Brad. Turns out you're both on the right track. The query is the same as it loops over various databases and appends the results using the QofQ. There is no chance of the records being the same since they are in different databases and one of the columns is the database name. The union all seems like a perfect. It worked immediately. I never knew about this option. Thank you, Brad. Carl, there were 45 columns in the query and not having to specify them all was the solution I opted for. Detailing their types may have worked just as well. Thanks again for your help. Brent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312761 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Empty error message in a query of queries
Here's the beginning of the error message for a query of queries: Message [empty string] StackTrace java.lang.ClassCastException at coldfusion.sql.imq.GenericComparator.compare(Comparator.java:67) at coldfusion.sql.imq.TableSorter.compareTo(TableSorter.java:156) at coldfusion.sql.imq.TableSorter.compareTo The query of queries goes: cfelseif qSelectReports.currentrow gt 1 cfquery name=qReportSummary dbtype=query select * from qSummary union select * from qReportSummary /cfquery The query has worked for months until today. It continues to work for certain report summaries, but not in this one in particular. I'm thinking it's because of the data specific to that report. Anyone know of any special characters to look out for which might be causing the failure in the QofQ? ( ? So glad to have this forum to post to so; I'd like to keep my hair, Brent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312719 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Programmatically deleting a datasource
I found some terrific code to access the admin api on House of Fusion here. Thanks to all! In experimenting with the methods, I can successfully create a SQL datasource. What I'm having trouble doing is deleting it. factory.datasourceservice.removeDatasource(theDatasourceName) seems the logically choice. In doing so, the datasource gets deleted from factory.datasourceservice.getNames() but not from factory.datasourceservice.getDatasources(). The datasource will appear in the CF Admin list, but errors if I try to edit or verify it. Something changed, just not everything. Does anyone know what piece I might be missing? Thanks in advance! ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283262 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Programmatically deleting a datasource
Thanks, John, this is a much more concise, readable (and apparently reliable) way to go. In a matter of a few minutes, I was able to properly delete a datasource. Then it was straight-forward to creating way this way too. Again thanks, Brent Brent, Use the AdminAPI instead of accessing the factory directly. The adminapi will provide the ability to create/delete datasources. The underlining factory could change with with future releases of CF and the AdminAPI is there to provide a stable level of abstraction that you can use. http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=1734.htm John [EMAIL PROTECTED] ~| CF 8 â Scorpio beta now available, easily build great internet experiences â Try it now on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283300 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Nestd loop bug with a twist
Hello Forum, I am aware of the bug in regards to an inner loop not being able to access the values in an outer one. It most cases I'd drop a temporary variable right before the inner loop begins so I can reference it inside. What I'm doing now is creating a report from a configuration table that may have additional columns in the future. I run a query from syscolumns to get the list of columns when the report is ran. For the output, is there a way to output a column's value based on the position of the column in the recordset (like an array's index)? The only way I know to output a value is to say #queryName.columnName#. This leads me to cfoutput over the value query, and cfloop over the column query asking for #evaluate(qValues.#qColumns.name#)# where qColumns.name outputs the column's name and the evaluate() outputs the value. The code would work fine if it weren't for CF's nested-loop bug. What happens is the first row's values are repeated for each record which is not the stored data in the database. Any ideas how to either drop a temporary row from the qValues query to reference in the inner loop or access qValues' columns using their ordinal positions? Below is the code: !--- goofs only because of CF bug in nested loops --- table border=1 width=100% tr cfoutput query=qColumnNames td#qColumnNames.name#/td /cfoutput /tr cfoutput query=qValues tr cfloop query=qColumnNames td#evaluate(qValues.#qColumnNames.name#)#/td /cfloop /tr /cfoutput /table Any workarounds appreciated. ~| 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:268993 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help with query please.
Doug, Rick Root posted a thread which reminded me of the issue you are having. He's talking about a way to optimize a zip-lookup function perhaps similar to yours. That post is at: http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:50216 Hope this is of some help. Seems to me that the resultset is too large for SQL Server to handle. You could try running SQL Profiler to view memory statistics or reconfiguring SQL Server to have more memory if you have some to spare. ~| 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:269019 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Nestd loop bug with a twist
Adrian, My sincerest thanks! I knew there had to be a way to reference a query like an array. I was trying to use the number of column... Your way is precise, easy-to-read and runs quickly. Thank you for your help! ~| 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:269028 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
A query errors referring to deleted columns yet it doesn't refer to them
Hello All, I'm wondering if anyone else has bumped into this oddity. I had a table with 25 columns that I had an update query update most of the fields. I then took out those fields from the query, and then the database. Happens all the time, right? For some reason, whenever I run the query, it fails stating it cannot find the deleted columns **even though the columns do not appear in the code CF shows with the error**. I've trimmed down the update to be a single column and it still errors stating 'unknown column' for the ones I deleted. If I add the unused columns back in, the query processes so I have a workaround. I was just hoping to only have valid fields in the database and not some that are needed because of a ghost query reference. I recycled the CF service, rebooted, pulled the query out of a cfc and pasted into the file, and still the same error. Any ideas? ~| 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:266737 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: A query errors referring to deleted columns yet it doesn't refer to them
Thanks, Ben, I forgot to mention I tried that prior. I tried it one more time just to be sure: no luck. I do have the Max Pooled Statements set to 0 from the default of 1000 because of issues caching the * statements throughout the app. That 0 helped those work. No luck on these hidden queries references by unchecking the Maintain Connection box. Thanks for the thought. The database / ColdFusion might be caching the datatable structures. In the ColdFusion admin, tryin editing the datasource and unchecking the maintain connection box (advanced settings). Then re-run the page. If this works, then it was just a caching issue (go back in and re-check that box as it has performance implications). If that does NOT work No idea. . Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com ~| 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:266739 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: A query errors referring to deleted columns yet it doesn't refer to them
Yep, it's the right datasource. I'll just use the workaround of having the fields there and not use them. I just hope this issue isn't the tip of some greater iceburg. Did you double check your data source? Perhaps you are calling an outdated database?? Other than that, I am out of suggestions. Good luck! . Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com ~| 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:266807 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Duplicate query execution in application.cfm for a certain page
Hello all, I'm having trouble debugging this one. I have a query in application.cfm that inserts to a table. For most pages, I see one record. For a particular page, I am seeing two. What would be in this file that could cause application.cfm to fire twice? I even tried using a request-scope flag to prevent the second entry with no luck. It's a simple page without any includes, and it's not being included. Thanks for any help on this, 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:257047 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Duplicate query execution in application.cfm for a certain page
These are good thoughts, Ben. I forgot to mention how simple this page is. I'm accessing it via a simple link in a navigation frame. Come to think of it, that is one thing I didn't think of. The refering page has no form, isn't doing a post and has no validation JavaScript. It's a basic a href. But the target is another frame. I will experiment with this a bit more. Thanks for your post, 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:257051 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Duplicate query execution in application.cfm for a certain page
Somehow this one worked itself out. I made the following changes: 1. made some changes to the frame that referred to it, 2. renamed the file and renamed it back, (didn't seem to work) 3. created a new page with a new name and linked to it in the calling frame, 4. removed the link and page created in 3. Of all of these, clearing the cache for the calling page seems to make the most sense. It's working now, and that's the best answer I have. ~| 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:257055 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
If that is related to the Max Pooled Statements field in a CF ODBC configuration, that makes sense. By setting this value to zero, I was able to resolve this issue. Thanks for your contributions. ~| 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:255074 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
Thanks, Andrew, Nope, not using cachewithin or cachedafter in any of the queries (unless that's something that is hidden in there by default). I am using v7.0.1 at this moment. I'm going to upgrade to 7.0.2 soon. Is this an issue with 7.0.1? I have set the Maximum number of cached queries to 0 in CF Admin, restarted IIS, restarted all CF services and the query ran fine... once. After it ran, I modified the table and back to the value cannot be converted to the requested type error. I have unchecked the Maintain Connection associated with the datasource... Thanks for your ideas. I hope something soon works. ~| 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:254605 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
Russ, I tried unchecking the Maintain Connection checkbox from CF Admin for this datasource and no luck. I even set the max cached queries to 0. I had high hopes because it makes sense that something with a CF optimization algorithm is over-caching. Any other ideas? These are good ones... ~| 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:254608 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
Right, another guy here suggested the same thing. That would essentially bypass the way CF is mapping out the * translation and allow SQL a chance to built the field list. The query would be copied-and-pasted into a SQL stored procedure so that's easy. The truth of it told, there are 524 stars in a ballpark 500 queries. That's going to take some time! Thanks for your help. Keep the good ideas rollin'. ~| 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:254607 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
Here's an example query. select *, 'x' as a_test from sc where sid = cfqueryparam cfsqltype=cf_sql_integer value=#arguments.sid# / So, yes, cfqueryparams in the where clause. What was your solution? Seems quite relevant to the situation at hand. Thanks for your input. ~| 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:254610 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
Has anyone out there had any experience with the Microsoft JDBC Type IV driver? When I delete a column referenced in a .* query, I get a value cannot be converted to the requested datatype error from the default JDBC driver. ~| 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:254612 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
Somehow this thread seems to have gotten split. Yes, I goofed when I created the post because I wasn't subscribed. Previously it would not have added to HoF. Now it does subscribe a non-subscriber automatically and it refreshing the Talk page, my post wasn't there. No sooner than I post a second thread of the same content, does my first one appear. Now I know it will subscribe me automatically. What you are saying makes a lot of sense from what I am experiencing. Some layer with CF that is not dynamic like a true SQL-executed select *. I'm going to find this max pooled thing you make reference to. Thank you very much for your ideas. ~| 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:254613 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
Brian, setting Max Pooled Statements to 0 worked the first time I ran the query, but not any times after that. How crazy. I even tried setting the Timeout and Interval to 0s and no luck at all. I also have Maintain Connections unchecked. I believe this can be accomplished by setting Max Pooled Statements in the advanced properties on your datasource to 0. ~| 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:254615 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
ANSWER FOUND By updating the datasource's Max Connection Pooling property to 0, each change to the db is reflected dynamically on the next front-end page refresh. This is exactly how I expected select * to work... find the columns real time and gimme 'em all. Thank you Brian Rinaldi for your answer!! Totally saved the day. And tomorrow and at good week or two of testing the 524 legacy *s not to mention all the typing involved in spelling out columns... ~| 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:254618 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
And thanks to everyone else who posted their ideas. I appreciate your insights and willingness to help! And to HoF for existing. ~| 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:254619 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
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:254450 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
select * (star) cache
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:254452 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) cache
Thanks, Rick. My experience thus far has been a different error message each time I change the database table. I've never seen anything like it. If I change the cfc query which uses * to anything else and refresh, I get good data. Then I can change the same query back to what it was with the star, and I will get the expected results. Somehow that query is cached in byte-code or whatever CF uses to improve performance, although here it's not helping! Additional note: I accidently posted the same topic twice. My mistake. ~| 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:254471 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
Thank you, Teddy, I will try it out. Thanks for your help and sparing me best practices preaching. ~| 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:254480 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
Teddy, I was hoping that'd be the answer, but it's not. Doesn't seem to affect anything relevant to the queries. There must be something because if I add a column to the table with a star, I got an error value cannot be converted to the requested type. I changed the query to add a static value ('x' as temp) and it ran fine. Then I took out the static field, and it ran fine. Thus, I believe it's something to do with the way CF is caching the query. Does it matter this query is in a .cfc that is an application-level object with a get function that runs a star query? I'm thinking it's the star regardless of CF-implementation. Any help appreciated. 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:254508 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
I don't mind doing so. It would a) save me the headache of going through each query and de-starring it, and b) provide a user-controlled vehicle for flushing this cache so I know when it's going to happen. The initial cost is going to save me tons of mindless coding and testing. ~| 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:254506 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) cache
Thanks for the comment, Brian. If changing the code recomplies the query, there must be a way to recompile all the queries by marking them for replacement as changing its code does. I'd like to be able to drop all queries from cache with a URL parameter or hidden form field or something I can control. Even a CF Administrator setting or option or process would be fine too. Something short of restarting CF Services or IIS. ~| 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:254507 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
Thanks for this, Russ! I will test this tomorrow. The checkbox may save a lot of short-term work. My thanks. ~| 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:254517 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Path of a cfc important?
Russ and James, Thanks for your help. You were both right on. ~| 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:249963 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Select * in a view needs recompiled
Using MS SQL Server, I have a view that pulls a table with a *. I added a column to that table, and the view's data did not reflect the new column right away. In Query Analyzer, if I ran the view after adding the column from right-click Open View, the new column wasn't there. If I went into design mode and clicked the !, the new column was there. So in design mode, I added a space and deleted it in the SQL then saved the view. Now I can see the new column from right-click Open View. I'm a bit let down the * isn't as dynamic as it seems. ~| 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:250008 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 * in a view needs recompiled
I was just thinking that there might be a setting in SQL Server that was geared for optimization and cached the view definition. Perhaps there is a way to reconfigure it to check for changes more often. I might not change it because it's a small extra step to re-save each view (there aren't many) when I change a table that is referenced by a * in that view. It's a question of SQL-processing performance vs development-time performance. Just thinking out loud. 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:250016 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 * in a view needs recompiled
Thanks for the insights, John. Glad to have my observation on SQL's handling of the * confirmed. ~| 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:250021 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Path of a cfc important?
Hello all, I have a bunch of .cfcs in the same folder whose init() function creates application-level instances of the cfc object. I make reference to one of these objects as a parameter when initializing another cfc. It works fine when everything is in the same folder. When I pass in an application-level object to a cfc in a different folder, I get an error that the parameter object's type is not the expected type. I'm wondering if anyone has seen this before and knows how to correct. Here's some code to help: /cfcs/email/email.cfc cffunction name=init returntype=email output=false cfargument name=mailserv type=mailserver required=true / cfset variables.mailserv = arguments.mailserv / cfreturn this / /cffunction /cfcs/mailserv/mailserv.cfc cffunction name=init returntype=mailserver output=false ... cfreturn this / /cffunction in application.cfm: cfset application.mailserv = createObject(component, cfcs.mailserv.mailserv).init() / cfset application.email = createObject(component, cfcs.email.email).init(mailserv = application.mailserv) / Thanks in advance. Been trying everything to no avail! ~| 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:249484 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4