Re: Aggregate query help please
Hi Barney Your answer was cut - would you mind resending please ~| 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:324690 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Aggregate query help please
I have no idea what that was. My sent mail has the same blank message, but I didn't reply. WITH ROLLUP is the clause you want though, if your DB supports it. cheers, barneyb -- Barney Boisvert bboisv...@gmail.com http://www.barneyb.com/ On Jul 17, 2009, at 4:09 PM, Seamus Campbell coldfus...@boldacious.com wrote: Hi Barney Your answer was cut - would you mind resending please ~| 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:324691 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Aggregate query help please
I've got some code that uses the JExcelAPI for converting queries to Excel spreadsheets. It's got some support for formulas, so theoretically you could wow the people you need to send it to by not only having the sums there, but having them update if they change the numbers in the various columns. Here's an example of its use: var workbook = variables.workbook; var sheet = workbook.createSheet(Test Sheet); var results = ; sheet.addFormula(evaluateat=row,columnname=Net,formula=sum(amt[currentrow])-((sum(amt[currentrow]) * 5) / 100)); sheet.setQuery(runQuery(SELECT *,'' as overhead FROM creadittransactions LIMIT 19,myDSN)); workbook.writeXLSFile(./test.xls); results = sheet.getQuery(); debug(results); Dunno if an approach like that would be easier or harder, but, well, it's yours for the asking. -- Permanence, perseverance and persistence in spite of all obstacle s, discouragement s, and impossibilities: It is this, that in all things distinguishes the strong soul from the weak. Thomas Carlyle On Thu, Jul 16, 2009 at 5:57 AM, Seamus Campbellcoldfus...@boldacious.com wrote: I have a database (access at the moment) for members of an organisation. The members are scattered throughout (mostly in one state) Australia (with a couple in the US) They all are one of three language groups. I need to export an excel spreadsheet with a count of members from each language group per town, region, state, country plus total count . Then another excel spreadsheet with the count per language group for the end of each financial year. (plus total here as well) I am just at my wits end trying to work this out. I have to have it ready in the next few days. Can anyone help - I think I'd need to forward the relevant tables and the spreadsheets to show the format needed. I'm willing to pay for someone to help me with this. (I presume that it's only 1-2 hours work for someone who knows what they are doing) Many thanks Seamus ~| 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:324692 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Aggregate query help please
I have a database (access at the moment) for members of an organisation. The members are scattered throughout (mostly in one state) Australia (with a couple in the US) They all are one of three language groups. I need to export an excel spreadsheet with a count of members from each language group per town, region, state, country plus total count . Then another excel spreadsheet with the count per language group for the end of each financial year. (plus total here as well) I am just at my wits end trying to work this out. I have to have it ready in the next few days. Can anyone help - I think I'd need to forward the relevant tables and the spreadsheets to show the format needed. I'm willing to pay for someone to help me with this. (I presume that it's only 1-2 hours work for someone who knows what they are doing) Many thanks Seamus ~| 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:324583 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Aggregate query help please
On Thu, Jul 16, 2009 at 4:57 AM, Seamus Campbellcoldfus...@boldacious.com wrote: I have a database (access at the moment) for members of an organisation. The members are scattered throughout (mostly in one state) Australia (with a couple in the US) They all are one of three language groups. I need to export an excel spreadsheet with a count of members from each language group per town, region, state, country plus total count . Then another excel spreadsheet with the count per language group for the end of each financial year. (plus total here as well) I am just at my wits end trying to work this out. I have to have it ready in the next few days. Can anyone help - I think I'd need to forward the relevant tables and the spreadsheets to show the format needed. I'm willing to pay for someone to help me with this. (I presume that it's only 1-2 hours work for someone who knows what they are doing) Many thanks Seamus ~| 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:324593 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Recursion to retrieve blog thread - help please
I feel I should know how to do this, but I haven't really had to write a function like this yet. We have a blog site where, currently, users can post entries to their own respective blog, and replies can be made to that entry. Entries are kept in an entries table, and replies are kept in a replies table. Each reply belongs to a parent entry, so entryId is a foreign key within the replies table. I've been tasked with modifying the site so that replies can be made to replies, so you can have multi-level threads. I've done this, by adding parentReplyId as a column in the replies table. Each reply still has the entryID of the entry that ultimately started the thread to which it belongs, but now parentReplyId gives additional info - if this is null, then the reply is a top-level reply, made to an entry directly, and if it is not null, then the reply has been made to another reply. Now it comes down to writing a cfc function that will retrieve an entry's reply nodes in the correct order, following each reply down the tree until it dead ends and then continuing on at the next level up (I'm sure there's a more technical term for this type of structure). So ultimately I'll be able to display reply A on the page with its child replies indented below it, and any of their child replies further indented below them, etc., until there are no more and its on to reply B...like how you see replies displayed on Daily Kos and Livejournal. I'm really not sure how this is typically done in a CFC function, or if I'm best off with returntype query, or returntype array, or if maybe this can be done in a single SQL query. But I've a strong feeling that it's done with recursion. Help please? Thanks, Christophe ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314869 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Recursion to retrieve blog thread - help please
Original call would look something like this, where entryID is all you need to start with: cfset myReplyTreeQry = getChildren(url.entryID, request.datasource) This would create a query result called myReplyTreeQry with the following columns: entryID replyID (of each reply) parentReplyID (of each reply, not really needed, but good for debugging) level (of each reply, to help in indenting as you output them) Obviously, more columns would need to be added to show all the actual Reply information, but this works for the recursive structure. cffunction name=getChildren returntype=query output=no cfargument name=entryID type=string required=yes cfargument name=datasource type=string required=yes cfargument name=parentReplyID type=string required=no default= cfargument name=rtnQuery type=query required=no cfargument name=levelCtr type=numeric required=no default=0 cfset var ds = arguments.datasource cfset var rtn = cfset var childQry = cfset var level = arguments.levelCtr cfif not structKeyExists(arguments, rtnQuery) cfset rtn = queryNew(entryID, replyID, parentReplyID, level) cfelse cfset rtn = arguments.rtnQuery /cfif cfquery datasource=#ds# name=childQry SELECT e.entryID, r.replyID, r.parentReplyID FROM entries e LEFT OUTER JOIN replies r ON e.entryID = r.entryID WHERE e.entryID = cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#arguments.entryID# AND r.parentReplyID = cfquerparam cfsqltype=CF_SQL_VARCHAR value=#arguments.parentReplyID# /cfquery cfif childQry.recordCount cfset level = level + 1 cfoutput query=childQry cfset queryAddRow(rtn) cfset querySetCell(rtn, entryID, entryID) cfset querySetCell(rtn, replyID, replyID) cfset querySetCell(rtn, parentReplyID, parentReplyID) cfset querySetCell(rtn, level, level) !--- now call this function recursively --- cfset rtn = getChildren( arguments.entryID, ds, replyID, duplicate(rtn), level ) /cfoutput /cfif cfreturn rtn /cffunction ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314872 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Recursion to retrieve blog thread - help please
Thank you very much - this works beautifully! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314889 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Align cfformgroup using hdividedbox, help please...
Hello, I'm starting to play with the cfformgroup tag and I'm hitting a snag. I would like to have two hdividedbox(s) side-by-side but I can not seem to get it to work. Can someone please tell me what I'm doing wrong. Thanks, tom Here is my test code... cfform format=flash width=800 height=600 action=flash_form.cfm cfformgroup type=tabnavigator !--- TAB - Client --- cfformgroup type=page label=Client !--- Group Box - Left Side--- cfformgroup type=hdividedbox cfformgroup type=horizontal label=Client ID cfinput name=ClientID type=text width=60 readonly=yes / cfinput name=Active type=checkbox label=Active /cfformgroup cfformgroup type=horizontal label=1) First/Last Name cfinput name=FirstName1 type=text width=120 / cfinput name=LastName1 type=text width=120 / /cfformgroup cfformgroup type=horizontal label=2) First/Last Name cfinput name=FirstName2 type=text width=120 / cfinput name=LastName2 type=text width=120 / /cfformgroup cfformitem type=spacer/cfformitem cfformgroup type=vertical label=Address cfinput name=Address1 type=text width=250 / cfinput name=Address2 type=text width=250 / /cfformgroup cfformgroup type=horizontal label=City/State/Zip cfinput name=City type=text width=110 / cfinput name=State type=text width=40 / cfinput name=Zip type=text width=84 / /cfformgroup cfformitem type=spacer/cfformitem cfformgroup type=vertical cfinput name=PhoneHome label=Home type=text width=250 / cfinput name=PhoneWork label=Work type=text width=250 / cfinput name=PhoneMobile label=Mobile type=text width=250 / cfinput name=EMail label=Email type=text width=250 / /cfformgroup /cfformgroup !--- Group Box - Right Side--- cfformgroup type=hdividedbox cfformgroup type=vertical label=Age next birthday cfinput name=Age1 type=radio label=18-30 value=18-30 / cfinput name=Age1 type=radio label=31-40 value=31-40 / /cfformgroup /cfformgroup /cfformgroup !--- TAB - More Info --- cfformgroup type=page label=Patients cfformgroup type=horizontal label=Age next birthday cfinput name=Age type=radio label=18-30 value=18-30 / cfinput name=Age type=radio label=31-40 value=31-40 / ~| 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:310642 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Align cfformgroup using hdividedbox, help please...
I figured it out i was not using the hbox and vbox properly. tom On Aug 10, 2008, at 10:11 AM, Tom Jones wrote: Hello, I'm starting to play with the cfformgroup tag and I'm hitting a snag. I would like to have two hdividedbox(s) side-by-side but I can not seem to get it to work. Can someone please tell me what I'm doing wrong. Thanks, tom Here is my test code... cfform format=flash width=800 height=600 action=flash_form.cfm cfformgroup type=tabnavigator !--- TAB - Client --- cfformgroup type=page label=Client !--- Group Box - Left Side--- cfformgroup type=hdividedbox cfformgroup type=horizontal label=Client ID cfinput name=ClientID type=text width=60 readonly=yes / cfinput name=Active type=checkbox label=Active /cfformgroup cfformgroup type=horizontal label=1) First/Last Name cfinput name=FirstName1 type=text width=120 / cfinput name=LastName1 type=text width=120 / /cfformgroup cfformgroup type=horizontal label=2) First/Last Name cfinput name=FirstName2 type=text width=120 / cfinput name=LastName2 type=text width=120 / /cfformgroup cfformitem type=spacer/cfformitem cfformgroup type=vertical label=Address cfinput name=Address1 type=text width=250 / cfinput name=Address2 type=text width=250 / /cfformgroup cfformgroup type=horizontal label=City/State/Zip cfinput name=City type=text width=110 / cfinput name=State type=text width=40 / cfinput name=Zip type=text width=84 / /cfformgroup cfformitem type=spacer/cfformitem cfformgroup type=vertical cfinput name=PhoneHome label=Home type=text width=250 / cfinput name=PhoneWork label=Work type=text width=250 / cfinput name=PhoneMobile label=Mobile type=text width=250 / cfinput name=EMail label=Email type=text width=250 / /cfformgroup /cfformgroup !--- Group Box - Right Side--- cfformgroup type=hdividedbox cfformgroup type=vertical label=Age next birthday cfinput name=Age1 type=radio label=18-30 value=18-30 / cfinput name=Age1 type=radio label=31-40 value=31-40 / /cfformgroup /cfformgroup /cfformgroup !--- TAB - More Info --- cfformgroup type=page label=Patients cfformgroup type=horizontal label=Age next birthday cfinput name=Age type=radio label=18-30 value=18-30 / cfinput name=Age type=radio label=31-40 value=31-40 / ~| 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:310644 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Query Help Please
select *, exists ( select * from orders where date between #date1# and #date2# ) as hasOrdered from customers order by name, id Use CFQUERYPARAM, of course. Another variation is a left join. Ditto on using cfqueryparam. SELECT c.ID, c.Name, c.Email, SUM(CASE WHEN o.Date IS NULL THEN 0 ELSE 1 END) ordersFound FROMtblCustomers AS c LEFT JOIN tblOrders AS o ON c.ID = o.UserID AND o.Date BETWEEN @startDate AND @endDate GROUP BY c.ID, c.Name, c.Email ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304381 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Query Help Please
I dont believe this is working with Access DB SUM(CASE WHEN o.Date IS NULL THEN 0 ELSE 1 END) ordersFound C S [EMAIL PROTECTED] wrote: select *, exists ( select * from orders where date between #date1# and #date2# ) as hasOrdered from customers order by name, id Use CFQUERYPARAM, of course. Another variation is a left join. Ditto on using cfqueryparam. SELECT c.ID, c.Name, c.Email, SUM(CASE WHEN o.Date IS NULL THEN 0 ELSE 1 END) ordersFound FROM tblCustomers AS c LEFT JOIN tblOrders AS o ON c.ID = o.UserID AND o.Date BETWEEN @startDate AND @endDate GROUP BY c.ID, c.Name, c.Email ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304382 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Query Help Please
I dont believe this is working with Access DB SUM(CASE WHEN o.Date IS NULL THEN 0 ELSE 1 END) ordersFound I think Access's version of CASE is IIF(..). Try using IIF instead and also try the query Barney suggested. One of them should work. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304392 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Query Help Please
I will try to make this as simple as possible. Any help would be greatly appreciated. I have 2 tables like below. tblCustomers === ID | Name | Email | 1, John, [EMAIL PROTECTED] 2, Bob, [EMAIL PROTECTED] 3, Steve, [EMAIL PROTECTED] === tblOrders === UserID | Date| 1, 12/22/2007 3, 1/2/2008 === I want to do a query like a scorecard view, that will list all CUSTOMERS and show yes or no if they had an order bewtween 2 dates. RESULTS WOULD BE LIKE THIS IF I SEARCH BETWEEN 12/01/2007 - 1/30/2008 - ID | Name | Email | 1, John, YES 2, Bob, NO 3, Steve, YES ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304374 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Query Help Please
select *, exists ( select * from orders where date between #date1# and #date2# ) as hasOrdered from customers order by name, id Use CFQUERYPARAM, of course. cheers, barneyb On Mon, Apr 28, 2008 at 8:57 PM, Brian Sheridan [EMAIL PROTECTED] wrote: I will try to make this as simple as possible. Any help would be greatly appreciated. I have 2 tables like below. tblCustomers === ID | Name | Email | 1, John, [EMAIL PROTECTED] 2, Bob, [EMAIL PROTECTED] 3, Steve, [EMAIL PROTECTED] === tblOrders === UserID | Date| 1, 12/22/2007 3, 1/2/2008 === I want to do a query like a scorecard view, that will list all CUSTOMERS and show yes or no if they had an order bewtween 2 dates. RESULTS WOULD BE LIKE THIS IF I SEARCH BETWEEN 12/01/2007 - 1/30/2008 - ID | Name | Email | 1, John, YES 2, Bob, NO 3, Steve, YES ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304375 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Some JS help please
Yep, I think this is the problem as well. If you take the code posted @ http://www.nomorepasting.com/getpaste.php?pasteid=14631 and move the entire script section to the bottom, the error goes away. On Wed, Apr 16, 2008 at 4:55 PM, Matt Williams [EMAIL PROTECTED] wrote: On Wed, Apr 16, 2008 at 2:47 PM, Bruce Sorge [EMAIL PROTECTED] wrote: I changed everything to regular select and regular form. Still the same issue. Just downloaded Firebug and I will work with that to see if I can spot the problem. Bruce It may be as simple as the fact that the select element does not exist before the JS runs. It is recommended that any JS depending on the DOM being written to be deferred somehow. Something like the window.onLoad() event. I can't remember the best practice here because I'm spoiled by jQuery and $(document).ready() -- Matt Williams It's the question that drives us. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303668 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Some JS help please Solved
OK, so I figured this out this morning. Nothing like getting a good nights sleep. What I did was this: Moved the function to the top, gave it a name, changed the document.getElementByID to document.FormName.FieldName, added the onChange event on the select list and it is working fine Thanks all for your advice. I do like Firebug though. I am finding it to be very handy. script type=text/javascript function Populate(Contacts) { var SiteContact = {}; var SitePhone = {}; !--- Populate Site Contact Information --- cfloop query=qSelectAllSites SiteContact[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SiteContact#'; SitePhone[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SitePhone#'; /cfloop // Listen for changes to the select box document.OpenNewCase.SiteContact.value=SiteContact[Contacts]; document.OpenNewCase.SitePhone.value=SitePhone[Contacts]; } /script /cfoutput Bruce ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303674 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Some JS help please
I am using this script: cfoutput script type=text/javascript var SiteContact = {}; var SitePhone = {}; !--- Populate Site Contact Information --- cfloop query=qSelectAllSites SiteContact[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SiteContact#'; SitePhone[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SitePhone#'; /cfloop // Listen for changes to the select box document.getElementById('Site_ID').onchange = function() { document.getElementById('SiteContact').value = qSelectAllSites[this.options[this.selectedIndex].value]; document.getElementByID('SitePhone').value = qSelectAllSites[this.options[this.selectedIndex].value]; } /script /cfoutput Everything works OK except for the first document.getElementByID. I am getting the error message: Error: document.getElementById(Site_ID) has no properties Source File: http://10.120.5.30/tt/Restricted/CaseForm.cfm Line: 78 The select is: cfselect name=Site_ID id=Site_ID query=qSelectAllSites display=SiteName value=SiteID/cfselect So what am I missing here? Doesn't the document.GetElementByID('Site_ID'). listen for the select list with the ID Site_ID? Thanks, Bruce ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303611 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Some JS help please
Hi Bruce: Haven't looked over all the code, but it's document.getElementById() ('Id', not 'ID'). hopefully that'll do it. On Wed, Apr 16, 2008 at 1:58 PM, Bruce Sorge [EMAIL PROTECTED] wrote: I am using this script: cfoutput script type=text/javascript var SiteContact = {}; var SitePhone = {}; !--- Populate Site Contact Information --- cfloop query=qSelectAllSites SiteContact[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SiteContact#'; SitePhone[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SitePhone#'; /cfloop // Listen for changes to the select box document.getElementById('Site_ID').onchange = function() { document.getElementById('SiteContact').value = qSelectAllSites[this.options[this.selectedIndex].value]; document.getElementByID('SitePhone').value = qSelectAllSites[this.options[this.selectedIndex].value]; } /script /cfoutput Everything works OK except for the first document.getElementByID. I am getting the error message: Error: document.getElementById(Site_ID) has no properties Source File: http://10.120.5.30/tt/Restricted/CaseForm.cfm Line: 78 The select is: cfselect name=Site_ID id=Site_ID query=qSelectAllSites display=SiteName value=SiteID/cfselect So what am I missing here? Doesn't the document.GetElementByID('Site_ID'). listen for the select list with the ID Site_ID? Thanks, Bruce ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303616 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Some JS help please
Thanks for seeing that Charlie. But the issue still exists. It is the first document.getElementById., the Site_ID one. Bruce Charlie Griefer wrote: Hi Bruce: Haven't looked over all the code, but it's document.getElementById() ('Id', not 'ID'). hopefully that'll do it ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303618 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Some JS help please
do you need for this to be cfform? i haven't touched cfform in years because i used to find that the JS it generated conflicted with my own home-grown JS. curious if something similar might be happening here. can you try it with a regular form and select and whatnot, just to see if maybe that's the issue? On Wed, Apr 16, 2008 at 2:12 PM, Bruce Sorge [EMAIL PROTECTED] wrote: Thanks for seeing that Charlie. But the issue still exists. It is the first document.getElementById., the Site_ID one. Bruce Charlie Griefer wrote: Hi Bruce: Haven't looked over all the code, but it's document.getElementById() ('Id', not 'ID'). hopefully that'll do it ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303620 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Some JS help please
Yeah, I will give that a shot. Bruce On Wed, Apr 16, 2008 at 2:15 PM, Charlie Griefer [EMAIL PROTECTED] wrote: do you need for this to be cfform? i haven't touched cfform in years because i used to find that the JS it generated conflicted with my own home-grown JS. curious if something similar might be happening here. can you try it with a regular form and select and whatnot, just to see if maybe that's the issue? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303624 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Some JS help please
Does using cfselect rather than a regular select change the id value somehow? The error you're getting would indicate that the element with id Site_ID is not found. You might want to use Firefox/Firebug and use Inspect to make sure the id is what you think it is. -- Josh - Original Message - From: Bruce Sorge [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, April 16, 2008 1:58 PM Subject: Some JS help please I am using this script: cfoutput script type=text/javascript var SiteContact = {}; var SitePhone = {}; !--- Populate Site Contact Information --- cfloop query=qSelectAllSites SiteContact[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SiteContact#'; SitePhone[#qSelectAllSites.SiteID#] = '#qSelectAllSites.SitePhone#'; /cfloop // Listen for changes to the select box document.getElementById('Site_ID').onchange = function() { document.getElementById('SiteContact').value = qSelectAllSites[this.options[this.selectedIndex].value]; document.getElementByID('SitePhone').value = qSelectAllSites[this.options[this.selectedIndex].value]; } /script /cfoutput Everything works OK except for the first document.getElementByID. I am getting the error message: Error: document.getElementById(Site_ID) has no properties Source File: http://10.120.5.30/tt/Restricted/CaseForm.cfm Line: 78 The select is: cfselect name=Site_ID id=Site_ID query=qSelectAllSites display=SiteName value=SiteID/cfselect So what am I missing here? Doesn't the document.GetElementByID('Site_ID'). listen for the select list with the ID Site_ID? Thanks, Bruce ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303627 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Some JS help please
I changed everything to regular select and regular form. Still the same issue. Just downloaded Firebug and I will work with that to see if I can spot the problem. Bruce Josh Nathanson wrote: Does using cfselect rather than a regular select change the id value somehow? The error you're getting would indicate that the element with id Site_ID is not found. You might want to use Firefox/Firebug and use Inspect to make sure the id is what you think it is. -- Josh ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303636 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Some JS help please
Bruce - can you view the source and paste it to a www.nomorepasting.com type site? hard to debug JS when it's not all been generated yet :) (but definitely use Firebug for your own testing/debugging. Firebug rocks) On Wed, Apr 16, 2008 at 2:47 PM, Bruce Sorge [EMAIL PROTECTED] wrote: I changed everything to regular select and regular form. Still the same issue. Just downloaded Firebug and I will work with that to see if I can spot the problem. Bruce Josh Nathanson wrote: Does using cfselect rather than a regular select change the id value somehow? The error you're getting would indicate that the element with id Site_ID is not found. You might want to use Firefox/Firebug and use Inspect to make sure the id is what you think it is. -- Josh ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303638 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Some JS help please
On Wed, Apr 16, 2008 at 2:47 PM, Bruce Sorge [EMAIL PROTECTED] wrote: I changed everything to regular select and regular form. Still the same issue. Just downloaded Firebug and I will work with that to see if I can spot the problem. Bruce It may be as simple as the fact that the select element does not exist before the JS runs. It is recommended that any JS depending on the DOM being written to be deferred somehow. Something like the window.onLoad() event. I can't remember the best practice here because I'm spoiled by jQuery and $(document).ready() -- Matt Williams It's the question that drives us. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303640 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Some JS help please
Sure, Here it is: http://www.nomorepasting.com/getpaste.php?pasteid=14631 It is not the entire form though. Just the result of the JS and down to the select, incase anyone notices and says Hey, you forgot to close your form. And I am finding FireBug interesting. Bruce Charlie Griefer wrote: Bruce - can you view the source and paste it to a www.nomorepasting.com type site? hard to debug JS when it's not all been generated yet :) (but definitely use Firebug for your own testing/debugging. Firebug rocks) On Wed, Apr 16, 2008 at 2:47 PM, Bruce Sorge [EMAIL PROTECTED] wrote: ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303642 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Some JS help please
A - ha...the select element has a name of SiteID while the id is Site_ID -- I think this can cause problems in IE. You will want to have the name and the id be the same value. Firebug is indispensable to me at this point. Don't know how I lived without it. -- Josh - Original Message - From: Bruce Sorge [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, April 16, 2008 2:57 PM Subject: Re: Some JS help please Sure, Here it is: http://www.nomorepasting.com/getpaste.php?pasteid=14631 It is not the entire form though. Just the result of the JS and down to the select, incase anyone notices and says Hey, you forgot to close your form. And I am finding FireBug interesting. Bruce Charlie Griefer wrote: Bruce - can you view the source and paste it to a www.nomorepasting.com type site? hard to debug JS when it's not all been generated yet :) (but definitely use Firebug for your own testing/debugging. Firebug rocks) On Wed, Apr 16, 2008 at 2:47 PM, Bruce Sorge [EMAIL PROTECTED] wrote: ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303643 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Some JS help please
Two votes for Firebug. Never work without it. Pegs down my js fat finger problems, helps me know when external resources aren't available (usually by fat fingering resource paths), let's me see what headers are going out and being returned, see full server responses, and view the exact form variables that left in my requests. Absolutely wouldn't work without it. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303652 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cf_breadcrumb help please
hello, I am attempting to create a breadcrumb trail for this site i am working on. I downloaded the extension cf_breadcrumb from the adobe coldfusion downloads. but there are a few things i would like to customize in the file but am not sure how to do so. One of the issues i am running into is there there is no strict file system for this site and i am unable to incorporate one due to the fact that the IT guys want it to stay the same. the other pain is that the navigation menu is not database driven at all which takes away that option for the bread crumbs. I will post the code for the navigation link and the breadcrumb code as well. what i would like to do is make it so that the page titles in the links show up on the breadcrumb trail instead of the file names. and i want it to start at the welcome page instead of the root directory (cgi.script_name). any and all help is greatly appreciated. I have the call for the cf_breadcrumb is in the header file: cfinclude template=cf_breadcrumb.cfm cf_breadcrumbs.cfm: cfsetting enablecfoutputonly=Yes !--- # # # Template: CF_BreadCrumb version 1.0 # # Author: Bruce Heerssen # # Date: Jan 04, 2001 # # Last Modified: Jan 11, 2001 # # # # -- NOTICE - # # # # Copyright 2001, Bruce Heerssen # # # # This script is provided under the GNU Public liscense and is therefore # # freeware. You are free to modify this code and use it in any way you see # # fit, with the following execptions: # # # # If you would like to redistribute this code as a complete product, please # # leave this notice in place and do not claim this code as your own work. # # # # Also, please notify the author of any changes you make to the code # # before redistribution. # # # # --- Standard Disclaimer --- # # Although this code has been tested and should present no problems, users # # should be aware that this code does not come with any guarantee of fitness or # # suitablility for any purpose, expressly stated or otherwise. By using this # # code, you agree that you will not hold Bruce Heerssen resposible or liable for # # any damage or liability incurred in the use of this code. Use at your own # # risk. As with all new code, be sure to test this tag in a NON-production # # environment BEFORE placing it on your production servers. # # # # If you have any questions, comments or complaints, please feel free to contact # # me at [EMAIL PROTECTED] # # # # Thank you, # # Bruce Heerssen # # --- cfparam name=attributes.name default= cfparam name=attributes.class default= cfparam name=attributes.target default= cfparam name=attributes.onclick default= cfparam name=attributes.onmouseover default= cfparam name=attributes.onmouseout default= cfparam name=attributes.title default= cfparam name=attributes.symbol default= cfparam name=attributes.enableLinks default=yes cfscript variables.outputStr = ; variables.pathList = cgi.script_name; variables.listLength = listLen(variables.pathList, /); variables.elementUrl = ; variables.counter = 0; while (variables.counter lt variables.listLength) { variables.counter = variables.counter + 1; variables.thisElement = listGetAt(variables.pathList, variables.counter, /); variables.elementLength = len(thisElement); variables.elementName = ucase(left(variables.thisElement, 1)) lcase(right(variables.thisElement, variables.elementLength - 1)); //replace the underscores with spaces variables.elementName = replace(variables.elementName, _, , ALL); variables.elementUrl = listAppend(variables.elementUrl, variables.thisElement, /); variables.outputStr = variables.outputStr a; if (len(attributes.name)) { variables.outputStr = variables.outputStr ' name=#attributes.name#'; } if ((attributes.enableLinks is 'yes') AND (len(attributes.title) and counter eq variables.listLength)){ variables.outputStr = variables.outputStr 'href=/#lcase(variables.elementUrl)#'; } else { variables.outputStr = variables.outputStr ' href=/#lcase(variables.elementUrl)#'; } if (len(attributes.class)) { variables.outputStr = variables.outputStr ' class=#attributes.class#'; } if (len(attributes.target)) { variables.outputStr = variables.outputStr ' target=#attributes.target#'; } if (len(attributes.onclick)) { variables.outputStr = variables.outputStr ' onclick=#attributes.onClick#'; } if (len(attributes.onmouseover)) { variables.outputStr = variables.outputStr ' onmouseover=#attributes.onmouseover#'; } if (len(attributes.onmouseout)) { variables.outputStr = variables.outputStr ' onmouseout=#attributes.onmouseout#'; } if (len(attributes.title) and counter eq variables.listLength) { /* if you want to show the current page in the breadcrumb, remove comments from
Help please - a 500 null error
I am getting a 500 null error (and that is all it says) under MX7. The code works great under CF8 (and in fact is modified from a site I wrote previously that works perfectly still). It is not using any CF8 features as my host does not yet support it. Tried local MX7 (500 Null) and CF8 (works great - as intended). Any ideas where I should look to solve this problem? ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293446 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Help please - a 500 null error
Pete, Try putting cfflush / as the VERY FIRST part of the application. What I find with the 500 NULL errors is that an error is occuring so early that no content even gets flushed the browser. But putting CFFlush in, it sometimes forces the ColdFusion Exception objecto be dumped to the screen. .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Peter Tilbrook [mailto:[EMAIL PROTECTED] Sent: Friday, November 16, 2007 12:52 AM To: CF-Talk Subject: Help please - a 500 null error I am getting a 500 null error (and that is all it says) under MX7. The code works great under CF8 (and in fact is modified from a site I wrote previously that works perfectly still). It is not using any CF8 features as my host does not yet support it. Tried local MX7 (500 Null) and CF8 (works great - as intended). Any ideas where I should look to solve this problem? ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293455 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 please - a 500 null error
Check your ColdFusion server logs. They will usually contain the real error. I have gotten 500 NULLs before when wddxing large objects, or applying regex to very lengthy strings. It could be a number of things-- but likely memory related. ~Brad -Original Message- From: Peter Tilbrook [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 11:52 PM To: CF-Talk Subject: Help please - a 500 null error I am getting a 500 null error (and that is all it says) under MX7. The code works great under CF8 (and in fact is modified from a site I wrote previously that works perfectly still). It is not using any CF8 features as my host does not yet support it. Tried local MX7 (500 Null) and CF8 (works great - as intended). Any ideas where I should look to solve this problem? ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293470 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfquery error, help please.
With query of query you don't have database functions like LEFT() because you are not running your query on a database engine like MS SQL or MySQL. Do a CF left() function when you output your data. -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 1:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might be the fix or problem? The error itself is: *Query Of Queries syntax error.* Encountered LEFT. Incorrect Select List, Incorrect select column, BTW, what I'm doing is trying to grab the latest file based on the month in the file name. The naming convention for the files are Jan07Calander.doc I can't just take the max because when a file like Aug07Calander.doc is placed in the directory, it won't pick it up. Thanks.. ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285081 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfquery error, help please.
What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might be the fix or problem? The error itself is: *Query Of Queries syntax error.* Encountered LEFT. Incorrect Select List, Incorrect select column, BTW, what I'm doing is trying to grab the latest file based on the month in the file name. The naming convention for the files are Jan07Calander.doc I can't just take the max because when a file like Aug07Calander.doc is placed in the directory, it won't pick it up. Thanks.. ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285076 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfquery error, help please.
Thanks Chad. I'll have to do some more coding to resolve my issue. On 8/1/07, Chad Gray [EMAIL PROTECTED] wrote: With query of query you don't have database functions like LEFT() because you are not running your query on a database engine like MS SQL or MySQL. Do a CF left() function when you output your data. -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 1:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might be the fix or problem? The error itself is: *Query Of Queries syntax error.* Encountered LEFT. Incorrect Select List, Incorrect select column, BTW, what I'm doing is trying to grab the latest file based on the month in the file name. The naming convention for the files are Jan07Calander.doc I can't just take the max because when a file like Aug07Calander.doc is placed in the directory, it won't pick it up. Thanks.. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285098 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfquery error, help please.
As far as I know it is not possible to do substring manipulation in a query of queries. Unless CF8 changed something, I think your only option is to loop manually over the result set and use mid() ~Brad -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 12:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might be the fix or problem? The error itself is: *Query Of Queries syntax error.* Encountered LEFT. Incorrect Select List, Incorrect select column, BTW, what I'm doing is trying to grab the latest file based on the month in the file name. The naming convention for the files are Jan07Calander.doc I can't just take the max because when a file like Aug07Calander.doc is placed in the directory, it won't pick it up. Thanks.. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285101 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfquery error, help please.
why not just do that string manipulation in the original query? On 8/1/07, Brad Wood [EMAIL PROTECTED] wrote: As far as I know it is not possible to do substring manipulation in a query of queries. Unless CF8 changed something, I think your only option is to loop manually over the result set and use mid() ~Brad -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 12:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might be the fix or problem? The error itself is: *Query Of Queries syntax error.* Encountered LEFT. Incorrect Select List, Incorrect select column, BTW, what I'm doing is trying to grab the latest file based on the month in the file name. The naming convention for the files are Jan07Calander.doc I can't just take the max because when a file like Aug07Calander.doc is placed in the directory, it won't pick it up. Thanks.. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285107 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
HELP Please - Using Coldfusion to Import delimited txt files.
Someone help me... I need a way, other then using DTS to insert data into a SQL table. I was able to find some code on easyCFM.com, and it works, but only with comma delimited files. What I need to know is how I might be able to correct this so I can use files with other delimiters. Below is the text file and code. The way it is now, it works fine. When I change the delimiter from a comma ',' to say tilde '~' in the file and the code, I bombs! test.txt file: 20070510,Joe Smith, 312-555-1212,32121 20070510,Mary Smith, 312-555-1212,32121 20070509,John Doe, 413-555-4312,54331 20070508,Mike Cole, 541-555-9119,21112 20070504,Jane Short, 801-555-1332,73124 = Here's the code: !--- get and read the TXT file --- cffile action=read file=test.txt variable=txtfile !--- loop through the TXT file on line breaks and insert into database --- cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop !--- use a simple database query to check the results of the import - dumping query to screen --- cfquery name=rscsvdemo datasource=sqlconnect SELECT * FROM testload /cfquery cfdump var=#rscsvdemo# Someone help!! How do I fix it to work with other delimiters? I get the below error if I can the comma to say a pipeline '|'. I made sure to change the test.txt file to match. Invalid list index 4. In function ListGetAt(list, index [, delimiters]), the value of index, 4, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list.The error occurred in *testload.cfm: line 15* 13 :'#listgetAt('#index#',2, '|')#', 14 :'#listgetAt('#index#',3, '|')#', *15 :'#listgetAt('#index#',4)#'* 16 : ) 17 :/cfquery Thanks all!! ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284105 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: HELP Please - Using Coldfusion to Import delimited txt files.
It would appear that not all the lines of your input file have four values. Keep in mind current versions of CF ignore empty list elements. Ex: item1,item2,,item4 The above comma delimited list only has 3 items, even though it would appear to have 4. (Word is, CF8 fixed that) ~Brad = Invalid list index 4. In function ListGetAt(list, index [, delimiters]), the value of index, 4, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list.The error occurred in *testload.cfm: line 15* ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284109 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 Please - Using Coldfusion to Import delimited txt files.
Wait, I just noticed the fourth listgetat doesn't specify a delimiter-- which means it is defaulting to a comma. That would cause problems when using a | or ~ delimiter. (or technically, anything OTHER than a comma) If you change the fourth line to '#listgetAt('#index#',4,'|')#' that should help. ~Brad INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284114 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: HELP Please - Using Coldfusion to Import delimited txt files.
Dae, I have questions: cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop First, are you sure that #chr(10)##chr(13)# is working for you? I've always concatenated those two things together to get the carriage return linefeed. #chr(10) chr(13)#... Either way, the double set of pound signs isn't necessary here one set will do. Second, the last list get at is missing the pipe delimiter so that one will default to a comma. Did you do that on purpose or is that a typo? Also again, It isn't necessary to have all those pound signs in your listgetat statements. The following will work: cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('index',1, '|')#', '#listgetAt('index',2, '|')#', '#listgetAt('index',3, '|')#', '#listgetAt('index',4)#' ) /cfquery Does any of that help? Let us know. Cheers, Chris On 7/19/07, Dae [EMAIL PROTECTED] wrote: Someone help me... I need a way, other then using DTS to insert data into a SQL table. I was able to find some code on easyCFM.com, and it works, but only with comma delimited files. What I need to know is how I might be able to correct this so I can use files with other delimiters. Below is the text file and code. The way it is now, it works fine. When I change the delimiter from a comma ',' to say tilde '~' in the file and the code, I bombs! test.txt file: 20070510,Joe Smith, 312-555-1212,32121 20070510,Mary Smith, 312-555-1212,32121 20070509,John Doe, 413-555-4312,54331 20070508,Mike Cole, 541-555-9119,21112 20070504,Jane Short, 801-555-1332,73124 = Here's the code: !--- get and read the TXT file --- cffile action=read file=test.txt variable=txtfile !--- loop through the TXT file on line breaks and insert into database --- cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop !--- use a simple database query to check the results of the import - dumping query to screen --- cfquery name=rscsvdemo datasource=sqlconnect SELECT * FROM testload /cfquery cfdump var=#rscsvdemo# Someone help!! How do I fix it to work with other delimiters? I get the below error if I can the comma to say a pipeline '|'. I made sure to change the test.txt file to match. Invalid list index 4. In function ListGetAt(list, index [, delimiters]), the value of index, 4, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list.The error occurred in *testload.cfm: line 15* 13 :'#listgetAt('#index#',2, '|')#', 14 :'#listgetAt('#index#',3, '|')#', *15 :'#listgetAt('#index#',4)#'* 16 : ) 17 :/cfquery Thanks all!! ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284117 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 Please - Using Coldfusion to Import delimited txt files.
On 7/19/07, Dae [EMAIL PROTECTED] wrote: Invalid list index 4. In function ListGetAt(list, index [, delimiters]), the value of index, 4, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list.The error occurred in *testload.cfm: line 15* 13 :'#listgetAt('#index#',2, '|')#', 14 :'#listgetAt('#index#',3, '|')#', *15 :'#listgetAt('#index#',4)#'* 16 : ) 17 :/cfquery I don't see that you specified a delimiter for the last listGetAt() function... so it'd default to comma. -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284116 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: HELP Please - Using Coldfusion to Import delimited txt files.
Thank you Charlie!! I didn't think it needed one because after the 4th field, it's a CR/LR. Regardless, changing to: '#listgetAt('#index#',4, '|')#', WORKED!!! THANK YOU!!! - Dae === On 7/19/07, Charlie Griefer [EMAIL PROTECTED] wrote: On 7/19/07, Dae [EMAIL PROTECTED] wrote: Invalid list index 4. In function ListGetAt(list, index [, delimiters]), the value of index, 4, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list.The error occurred in *testload.cfm: line 15* 13 :'#listgetAt('#index#',2, '|')#', 14 :'#listgetAt('#index#',3, '|')#', *15 :'#listgetAt('#index#',4)#'* 16 : ) 17 :/cfquery I don't see that you specified a delimiter for the last listGetAt() function... so it'd default to comma. -- Charlie Griefer ~| ColdFusion 8 beta â Build next generation applications today. Free beta download 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:284120 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: HELP Please - Using Coldfusion to Import delimited txt files.
Someone help!! How do I fix it to work with other delimiters? I get the below error if I can the comma to say a pipeline '|'. I made sure to change the test.txt file to match. *15 :'#listgetAt('#index#',4)#'* Also, you forgot the pipe delimiter on the last line '#listgetAt(index, 4, '|')#' ~| 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:284123 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: HELP Please - Using Coldfusion to Import delimited txt files.
The performance of cffile action=read and cfloop list=file, delim=end of line chars is terribly poor... Furthermore (as you have found out), there's usually a lot of trial and error getting this to work. Assuming you have a well-formatted delimited text file, the best approach is to use CFHTTP: cfhttp url=http://www.domain.com/urltotextfile/file.txt; name=data columns=field1,field2,field3 firstrowasheaders=false delimiter=| textQualifier= / OR if your first row does contain column headers: cfhttp url=http://www.domain.com/urltotextfile/file.txt; name=data firstrowasheaders=true delimiter=| textQualifier= / Both will result in a query object named 'data'. Jake Pilgrim ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284132 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 Please - Using Coldfusion to Import delimited txt files.
Also again, It isn't necessary to have all those pound signs in your listgetat statements. The following will work: cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('index',1, '|')#', '#listgetAt('index',2, '|')#', '#listgetAt('index',3, '|')#', '#listgetAt('index',4)#' ) /cfquery But without the quotes around the index variable! Also, to aviod encountering the problem of empty items, i.e. 1|2||4, do a replace on all double occurrences of your delimiter before you start the loop. i.e. cfset txtFile = Replace(textFile, '||', '| |', 'all) You may even have to do that twice to fix two empty list items in a row (i.e. '1|||4'). Don't ask me why, but I seem to remember needing to do that! Finally, if it is a massive CSV file, you might wish to build a long SQL string first so that only make one call to the db. So: cfset txtFile = Replace(textFile, '||', '| |', 'all) cfset txtFile = Replace(textFile, '||', '| |', 'all) cfsavecontent variable=big_sql_statement cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt(index, 1, |)#', '#listgetAt(index, 2, |)#', '#listgetAt(index, 3, |)#', '#listgetAt(index, 4, |)#' ) /cfloop /cfsavecontent cfquery name=importtxt datasource=sqlconnect #big_sql_statement# /cfquery My tuppence, Dominic On 19/07/07, Christopher Jordan [EMAIL PROTECTED] wrote: Dae, I have questions: cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop First, are you sure that #chr(10)##chr(13)# is working for you? I've always concatenated those two things together to get the carriage return linefeed. #chr(10) chr(13)#... Either way, the double set of pound signs isn't necessary here one set will do. Second, the last list get at is missing the pipe delimiter so that one will default to a comma. Did you do that on purpose or is that a typo? Also again, It isn't necessary to have all those pound signs in your listgetat statements. The following will work: cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('index',1, '|')#', '#listgetAt('index',2, '|')#', '#listgetAt('index',3, '|')#', '#listgetAt('index',4)#' ) /cfquery Does any of that help? Let us know. Cheers, Chris On 7/19/07, Dae [EMAIL PROTECTED] wrote: Someone help me... I need a way, other then using DTS to insert data into a SQL table. I was able to find some code on easyCFM.com, and it works, but only with comma delimited files. What I need to know is how I might be able to correct this so I can use files with other delimiters. Below is the text file and code. The way it is now, it works fine. When I change the delimiter from a comma ',' to say tilde '~' in the file and the code, I bombs! test.txt file: 20070510,Joe Smith, 312-555-1212,32121 20070510,Mary Smith, 312-555-1212,32121 20070509,John Doe, 413-555-4312,54331 20070508,Mike Cole, 541-555-9119,21112 20070504,Jane Short, 801-555-1332,73124 = Here's the code: !--- get and read the TXT file --- cffile action=read file=test.txt variable=txtfile !--- loop through the TXT file on line breaks and insert into database --- cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop !--- use a simple database query to check the results of the import - dumping query to screen --- cfquery name=rscsvdemo datasource=sqlconnect SELECT * FROM testload /cfquery cfdump var=#rscsvdemo# Someone help!! How do I fix it to work with other delimiters? I get the below error if I can the comma to say a pipeline '|'. I made sure to change the test.txt file to match. Invalid list index 4. In function
RE: HELP Please - Using Coldfusion to Import delimited txt files.
You don't have the delimiter specified on the last item in the INSERT statement, but you need it. Otherwise listGetAt() (or any list function) assumes a comma delimiter. -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Thursday, July 19, 2007 12:35 PM To: CF-Talk Subject: HELP Please - Using Coldfusion to Import delimited txt files. Someone help me... I need a way, other then using DTS to insert data into a SQL table. I was able to find some code on easyCFM.com, and it works, but only with comma delimited files. What I need to know is how I might be able to correct this so I can use files with other delimiters. Below is the text file and code. The way it is now, it works fine. When I change the delimiter from a comma ',' to say tilde '~' in the file and the code, I bombs! test.txt file: 20070510,Joe Smith, 312-555-1212,32121 20070510,Mary Smith, 312-555-1212,32121 20070509,John Doe, 413-555-4312,54331 20070508,Mike Cole, 541-555-9119,21112 20070504,Jane Short, 801-555-1332,73124 = Here's the code: !--- get and read the TXT file --- cffile action=read file=test.txt variable=txtfile !--- loop through the TXT file on line breaks and insert into database --- cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop !--- use a simple database query to check the results of the import - dumping query to screen --- cfquery name=rscsvdemo datasource=sqlconnect SELECT * FROM testload /cfquery cfdump var=#rscsvdemo# Someone help!! How do I fix it to work with other delimiters? I get the below error if I can the comma to say a pipeline '|'. I made sure to change the test.txt file to match. Invalid list index 4. In function ListGetAt(list, index [, delimiters]), the value of index, 4, is not a valid as the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list.The error occurred in *testload.cfm: line 15* 13 :'#listgetAt('#index#',2, '|')#', 14 :'#listgetAt('#index#',3, '|')#', *15 :'#listgetAt('#index#',4)#'* 16 : ) 17 :/cfquery Thanks all!! ~| ColdFusion 8 beta â Build next generation applications today. Free beta download 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:284131 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 Please - Using Coldfusion to Import delimited txt files.
Dominic's right. I missed the quotes around the index variable. oops! :o) Chris On 7/19/07, Dominic Watson [EMAIL PROTECTED] wrote: Also again, It isn't necessary to have all those pound signs in your listgetat statements. The following will work: cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('index',1, '|')#', '#listgetAt('index',2, '|')#', '#listgetAt('index',3, '|')#', '#listgetAt('index',4)#' ) /cfquery But without the quotes around the index variable! Also, to aviod encountering the problem of empty items, i.e. 1|2||4, do a replace on all double occurrences of your delimiter before you start the loop. i.e. cfset txtFile = Replace(textFile, '||', '| |', 'all) You may even have to do that twice to fix two empty list items in a row ( i.e. '1|||4'). Don't ask me why, but I seem to remember needing to do that! Finally, if it is a massive CSV file, you might wish to build a long SQL string first so that only make one call to the db. So: cfset txtFile = Replace(textFile, '||', '| |', 'all) cfset txtFile = Replace(textFile, '||', '| |', 'all) cfsavecontent variable=big_sql_statement cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt(index, 1, |)#', '#listgetAt(index, 2, |)#', '#listgetAt(index, 3, |)#', '#listgetAt(index, 4, |)#' ) /cfloop /cfsavecontent cfquery name=importtxt datasource=sqlconnect #big_sql_statement# /cfquery My tuppence, Dominic On 19/07/07, Christopher Jordan [EMAIL PROTECTED] wrote: Dae, I have questions: cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop First, are you sure that #chr(10)##chr(13)# is working for you? I've always concatenated those two things together to get the carriage return linefeed. #chr(10) chr(13)#... Either way, the double set of pound signs isn't necessary here one set will do. Second, the last list get at is missing the pipe delimiter so that one will default to a comma. Did you do that on purpose or is that a typo? Also again, It isn't necessary to have all those pound signs in your listgetat statements. The following will work: cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('index',1, '|')#', '#listgetAt('index',2, '|')#', '#listgetAt('index',3, '|')#', '#listgetAt('index',4)#' ) /cfquery Does any of that help? Let us know. Cheers, Chris On 7/19/07, Dae [EMAIL PROTECTED] wrote: Someone help me... I need a way, other then using DTS to insert data into a SQL table. I was able to find some code on easyCFM.com, and it works, but only with comma delimited files. What I need to know is how I might be able to correct this so I can use files with other delimiters. Below is the text file and code. The way it is now, it works fine. When I change the delimiter from a comma ',' to say tilde '~' in the file and the code, I bombs! test.txt file: 20070510,Joe Smith, 312-555-1212,32121 20070510,Mary Smith, 312-555-1212,32121 20070509,John Doe, 413-555-4312,54331 20070508,Mike Cole, 541-555-9119,21112 20070504,Jane Short, 801-555-1332,73124 = Here's the code: !--- get and read the TXT file --- cffile action=read file=test.txt variable=txtfile !--- loop through the TXT file on line breaks and insert into database --- cfloop index=index list=#txtfile# delimiters=#chr(10)##chr(13)# cfquery name=importtxt datasource=sqlconnect INSERT INTO testload (date_add,name,phone,zip) VALUES ('#listgetAt('#index#',1, '|')#', '#listgetAt('#index#',2, '|')#', '#listgetAt('#index#',3, '|')#', '#listgetAt('#index#',4)#' ) /cfquery /cfloop !--- use a simple database query to check the results of the import - dumping query to screen --- cfquery name=rscsvdemo datasource=sqlconnect SELECT * FROM testload /cfquery cfdump
RE: HELP Please - Using Coldfusion to Import delimited txt files.
I think your confusion was that you really have two lists here. A crlf delimited list of pipe delimited lists. Each line of the file is a single item in the crlf delimited list. WITHIN each line is the second list of | delimited items. When you reference that inner list, you still have to tell CF that it is delimited by pipes each time. Just because you interrogate a string as a pipe delimited list three times in a row, doesn't make CF assume you still want to use a pipe the fourth time if you don't tell it. Technically the crlf isn't even part of the inner list at all. ~Brad -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Thursday, July 19, 2007 1:22 PM To: CF-Talk Subject: Re: HELP Please - Using Coldfusion to Import delimited txt files. Thank you Charlie!! I didn't think it needed one because after the 4th field, it's a CR/LR. Regardless, changing to: '#listgetAt('#index#',4, '|')#', WORKED!!! THANK YOU!!! ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284137 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 Please - Using Coldfusion to Import delimited txt files.
Ben Nadel wrote a nice function for parsing csv-type files that works very well: http://www.bennadel.com/index.cfm?dax=blog:498.view Cheers, Kris ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284136 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: HELP Please - Using Coldfusion to Import delimited txt files.
Nice Tip Jake! Chris On 7/19/07, Jake Pilgrim [EMAIL PROTECTED] wrote: The performance of cffile action=read and cfloop list=file, delim=end of line chars is terribly poor... Furthermore (as you have found out), there's usually a lot of trial and error getting this to work. Assuming you have a well-formatted delimited text file, the best approach is to use CFHTTP: cfhttp url=http://www.domain.com/urltotextfile/file.txt; name=data columns=field1,field2,field3 firstrowasheaders=false delimiter=| textQualifier= / OR if your first row does contain column headers: cfhttp url=http://www.domain.com/urltotextfile/file.txt; name=data firstrowasheaders=true delimiter=| textQualifier= / Both will result in a query object named 'data'. Jake Pilgrim ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284140 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
SQL Help, please ...
Hello, It's been a wile since I have had to do much in the way of SQL queries and I need some help. I have a table called installs that looks like this HostName, iDate, Package client1, 2007-06-01, Update1 client1, 2007-06-01, Update2 client1, 2007-06-01, Update3 client1, 2007-06-02, Update5 client1, 2007-06-02, NewApp client2, 2007-06-01, Update1 client2, 2007-06-01, Update2 client2, 2007-06-01, Update3 client2, 2007-06-02, Update5 client2, 2007-06-02, NewApp What I want is a report/summary like result that looks like this HostName, iDate, Installs client1, 2007-06-01, 3 client1, 2007-06-02, 2 client2, 2007-06-01, 3 client2, 2007-06-02, 2 I hope this makes sense and I know this is off topic but any hep would be great. Thanks, tom ~| 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:282317 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL Help, please ...
Let me get this straight, you want a report to summarize the number of installs by date and client. So client 1 ran 3 installs on 6/1 and 2 installs on 6/2. I believe you simply need to group by hostname, and then date and then use an aggregate function (count()) to add up the records in between like so: SELECT hostname, iDate, count(1) FROM installs GROUP BY hostname, iDate ORDER BY hostname, iDate The order by is optional, but I threw it in since your result set was ordered that way. Depending on whether or not your iDate column stores time or not, you may need to convert it to date only. (syntax depends on your DB). ~Brad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 10:16 PM To: CF-Talk Subject: SQL Help, please ... Hello, It's been a wile since I have had to do much in the way of SQL queries and I need some help. I have a table called installs that looks like this HostName, iDate, Package client1, 2007-06-01, Update1 client1, 2007-06-01, Update2 client1, 2007-06-01, Update3 client1, 2007-06-02, Update5 client1, 2007-06-02, NewApp client2, 2007-06-01, Update1 client2, 2007-06-01, Update2 client2, 2007-06-01, Update3 client2, 2007-06-02, Update5 client2, 2007-06-02, NewApp What I want is a report/summary like result that looks like this HostName, iDate, Installs client1, 2007-06-01, 3 client1, 2007-06-02, 2 client2, 2007-06-01, 3 client2, 2007-06-02, 2 I hope this makes sense and I know this is off topic but any hep would be great. Thanks, tom ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282367 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SQL Help, please ...
[EMAIL PROTECTED] wrote: HostName, iDate, Package client1, 2007-06-01, Update1 client1, 2007-06-01, Update2 client1, 2007-06-01, Update3 client1, 2007-06-02, Update5 client1, 2007-06-02, NewApp client2, 2007-06-01, Update1 client2, 2007-06-01, Update2 client2, 2007-06-01, Update3 client2, 2007-06-02, Update5 client2, 2007-06-02, NewApp What I want is a report/summary like result that looks like this HostName, iDate, Installs client1, 2007-06-01, 3 client1, 2007-06-02, 2 client2, 2007-06-01, 3 client2, 2007-06-02, 2 SELECT HostName, iDate, COUNT(Package) FROM installs GROUP BY HostName, iDate ORDER BY HostName, iDate Jochem ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282372 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Fusebox 5 install problem - help, please
On 5/18/07, Sandra Clark [EMAIL PROTECTED] wrote: Make sure your Fusebox_application_path in index.cfm points to the skeleton path. cfset FUSEBOX_APPLICATION_PATH = skeleton/ If I am reading your email message correctly. Thanks, Sandra I think the problem, which I didn't probably provide enough details for, was that this issue occurs when the virtual directory points to a location on a network share on another computer. I don't have any problems if everything is on the same machine and accessed via localhost. Thanks to Sean Corfield for this information. Stephen ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278702 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
OT: Fusebox 5 install problem - help, please
Sorry if this is off-topic. I wanted to install and try Fusebox 5. On my development system I've got a virtual directory configured named cf2 using IE6 running CFMX. I downloaded the FB 5.1 core files, extracted them from the archive and copied the fusebox5 directory to the root of the cf2 directory. Then I downloaded the FB5 skeleton app files, extracted them from the archive and copied the skeleton directory also to the root of the cf2 directory as per the readme.txt files (I think). I have both index.html and index.cfm files in the root of the cf2 directory and I can open both successfully in a browser at http://cf2/index.html and http://cf2/index.cfm. If I try to open http://cf2/skeleton/ I get an error: missing fusebox.xml The file fusebox.xml could not be found in the directory /ralj/cf2/skeleton/. Any idea what I'm doing wrong or how to get this working? Thanks in advance for any ideas. Stephen ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278652 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Fusebox 5 install problem - help, please
Make sure your Fusebox_application_path in index.cfm points to the skeleton path. cfset FUSEBOX_APPLICATION_PATH = skeleton/ If I am reading your email message correctly. Sandra Clark = http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -Original Message- From: Stephen Hait [mailto:[EMAIL PROTECTED] Sent: Friday, May 18, 2007 5:07 PM To: CF-Talk Subject: OT: Fusebox 5 install problem - help, please Sorry if this is off-topic. I wanted to install and try Fusebox 5. On my development system I've got a virtual directory configured named cf2 using IE6 running CFMX. I downloaded the FB 5.1 core files, extracted them from the archive and copied the fusebox5 directory to the root of the cf2 directory. Then I downloaded the FB5 skeleton app files, extracted them from the archive and copied the skeleton directory also to the root of the cf2 directory as per the readme.txt files (I think). I have both index.html and index.cfm files in the root of the cf2 directory and I can open both successfully in a browser at http://cf2/index.html and http://cf2/index.cfm. If I try to open http://cf2/skeleton/ I get an error: missing fusebox.xml The file fusebox.xml could not be found in the directory /ralj/cf2/skeleton/. Any idea what I'm doing wrong or how to get this working? Thanks in advance for any ideas. Stephen ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278653 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Urgent Help Please!
I have a fairly high volume site running on IIS 6 / 2003 R2 server, CF 7 Enterprise My site is running as a CF cluster with 2 members in round robin, and sticky sessions The only error in my event log I have is an IIS one, showing: A worker process with process id of '2012' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit. I see log entries showing Instance 1 and Instance 2 re-starting, but no crash log or error log in the server.log or exception.log that would indicate a reason the site was going down. Any idea's would help, I am getting screamed at!!! Chris ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275350 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Urgent Help Please!
Is there a guide out there for configuring IIS to handle upwards of 200 connection requests / second with Coldfusion 7 Ent? Chris -Original Message- From: Peterson, Chris [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 9:43 AM To: CF-Talk Subject: Urgent Help Please! I have a fairly high volume site running on IIS 6 / 2003 R2 server, CF 7 Enterprise My site is running as a CF cluster with 2 members in round robin, and sticky sessions The only error in my event log I have is an IIS one, showing: A worker process with process id of '2012' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit. I see log entries showing Instance 1 and Instance 2 re-starting, but no crash log or error log in the server.log or exception.log that would indicate a reason the site was going down. Any idea's would help, I am getting screamed at!!! Chris ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275361 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Urgent Help Please!
Here is a snip that I don't understand from my instance1-out.log: 04/16 09:26:29 info Clusterable service JNDIContextManager discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:27:19 info Clusterable service JRunRMIBroker discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:27:19 info Clusterable service SecurityContextCache discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:27:19 info Clusterable service ServletUsersService discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:27:19 info Clusterable service JRunProxyClusterHelper discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:27:19 info Clusterable service DeployerService discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:27:19 info Clusterable service ReplicationIdService discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:27:19 info Clusterable service SessionReplicationService discovered ClusterManager on 172.16.100.51:4160, cluster domain: CFCluster (Lookup Service's JINI-ID: 283dcde8-3d52-4ab6-b3e5-e13136da381a) 04/16 09:30:30 info Clusterable service DeployerService successfully removed a peer when that peer left the cluster 04/16 09:30:30 info Clusterable service SessionReplicationService successfully removed a peer when that peer left the cluster 04/16 09:30:30 info Clusterable service ReplicationIdService successfully removed a peer when that peer left the cluster 04/16 09:30:30 info Clusterable service JRunRMIBroker successfully removed a peer when that peer left the cluster 04/16 09:30:30 info Clusterable service SecurityContextCache successfully removed a peer when that peer left the cluster 04/16 09:30:30 info Clusterable service ServletUsersService successfully removed a peer when that peer left the cluster 04/16 09:30:30 info Clusterable service JNDIContextManager successfully removed a peer when that peer left the cluster 04/16 09:30:30 info Clusterable service JRunProxyClusterHelper successfully removed a peer when that peer left the cluster Anyone know why this is trying to discover cluster members? Chris ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275362 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Urgent Help Please!
Any idea's would help, I am getting screamed at!!! A mallet? Hatton ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275367 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Urgent Help Please!
Peterson, Chris wrote: I have a fairly high volume site running on IIS 6 / 2003 R2 server, CF 7 Enterprise Which hotfixes have you applied? Do you log long running requests? Do you have a requesttimeout? How long are your requests running? My site is running as a CF cluster with 2 members in round robin, and sticky sessions The only error in my event log I have is an IIS one, showing: A worker process with process id of '2012' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit. That is nothing to be worried about: http://w3-4u.blogspot.com/2006/11/qa-on-application-pool-time-limits.html Have you changed the default IIS configuration? Jochem ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275370 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Urgent Help Please!
I have not changed the default page configuration, and nothing un-expected is showing in the long page log ( I am parsing the server.log using Ray Camden's findslow.cfm template) Digging deeper on my instance err.log, I am seeing a lot of these errors during the time my site is un-responsive: error Error while reading header S_UNABLE java.net.SocketException: Connection reset by peer: socket write error error Error while reading header CODESNIPPET java.net.SocketException: Connection reset by peer: socket write error error Error while reading header BROBUSTENABLED java.net.SocketException: Connection reset by peer: socket write error I am not finding those on google anywhere, has anyone else seen these? Chris -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 10:55 AM To: CF-Talk Subject: Re: Urgent Help Please! Peterson, Chris wrote: I have a fairly high volume site running on IIS 6 / 2003 R2 server, CF 7 Enterprise Which hotfixes have you applied? Do you log long running requests? Do you have a requesttimeout? How long are your requests running? My site is running as a CF cluster with 2 members in round robin, and sticky sessions The only error in my event log I have is an IIS one, showing: A worker process with process id of '2012' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit. That is nothing to be worried about: http://w3-4u.blogspot.com/2006/11/qa-on-application-pool-time-limits.htm l Have you changed the default IIS configuration? Jochem ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275371 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Urgent Help Please!
On Monday 16 Apr 2007, Peterson, Chris wrote: java.net.SocketException: Connection reset by peer: socket write error The user closed their web browser, iirc. You can ignore them if so. -- Tom Chiverton Helping to assertively compete back-end portals on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275376 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Urgent Help Please!
Peterson, Chris wrote: I have not changed the default page configuration, and nothing un-expected is showing in the long page log ( I am parsing the server.log using Ray Camden's findslow.cfm template) Digging deeper on my instance err.log, I am seeing a lot of these errors during the time my site is un-responsive: error Error while reading header S_UNABLE java.net.SocketException: Connection reset by peer: socket write error error Error while reading header CODESNIPPET java.net.SocketException: Connection reset by peer: socket write error error Error while reading header BROBUSTENABLED java.net.SocketException: Connection reset by peer: socket write error robust_enabled is the name of a variable in neo_debug.xml that stores whether robust exception handling is enabled. That should not be an HTTP request header. Do you have debugging enabled? Jochem ~| 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:275377 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Urgent Help Please!
Nope, debugging is not enabled on either cluster-member instance. Check this one out, now I am finding this in my err.log file: java.lang.OutOfMemoryError: unable to create new native thread It looks like its hitting some type of native OS memory limit for creating threads? I found this article about it: http://www.talkingtree.com/blog/index.cfm/2005/3/11/NewNativeThread And I am setting the -Xss128k flag to make the threads allocate less memory as suggested below, and am testing on my dev server. As a secondary question, is there any negative impact to shutting down the 'jrun admin' instance? Right now I have each instance configured to allocate 1024M of ram at startup, and I have the admin, the cfusion, and instance1 and instance2 all allocating 1024 megs each. The cfusion seems to just be the management instance that houses the cluster, is that one necessary for the cluster to run? Thanks again for anyone's idea's! Chris ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275380 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Urgent Help Please!
Peterson, Chris wrote: Nope, debugging is not enabled on either cluster-member instance. Check this one out, now I am finding this in my err.log file: java.lang.OutOfMemoryError: unable to create new native thread It looks like its hitting some type of native OS memory limit for creating threads? I found this article about it: http://www.talkingtree.com/blog/index.cfm/2005/3/11/NewNativeThread And I am setting the -Xss128k flag to make the threads allocate less memory as suggested below, and am testing on my dev server. How many threads do you see in the taskmanager? Is that anywhere near the mentioned limit? As a secondary question, is there any negative impact to shutting down the 'jrun admin' instance? No. Right now I have each instance configured to allocate 1024M of ram at startup, and I have the admin, the cfusion, and instance1 and instance2 all allocating 1024 megs each. The cfusion seems to just be the management instance that houses the cluster, is that one necessary for the cluster to run? No. You should shut down the JRun Admin and the CFusion instance. (If you want to keep them running, put them back on their default memory configuration so they use considerable less memory.) That should give your server a lot of free memory to play with. I have had good results with setting -Xmx1280m and -Xmx1024m. This will make the instance grab 1024 MB at startup, but gives it room to increase to 1280 MB when needed. That way you can still see memory pressure by an increase in memory allocation, while you still get the big chunk at startup. Jochem ~| 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:275382 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Urgent Help Please!
Chris, First of all, I defer to any of the suggestions that Jochem gives you, since he's way better in the server configuration arena than I am (or many of us, for that matter). Windows defaults out of the box to about 7200 concurrent threads (src - http://gregluck.com/blog/ archives/2004/12/limits_to_threa_1.html - and his thread-test.jar available from the same post) for the JVM, though which should be adequate in most cases if what's being served from CF is optimized. If I may, I might also suggest taking a look at the queries on your hardest hit pages. The biggest violator in CF I've found, personally, for java.lang.OutOfMemory errors has been in manipulating the results of queries that are returning a large number of records in the base query (i.e. QoQ or cfoutput query=... group=...). Sometimes this starts to happen unexpectedly when a table has grown very large over time and the original queries weren't designed to deal with recordsets on that scale.Memory issues then get progressively worse as the table grows larger until the number of records being manipulated is so large that it creates the Out of memory errors and eventually hangs the server. HTH, Jon PS - Connection reset by peer: socket write error which you also mentioned can be caused by database connectivity issues - possibly also a query issue on the DBMS side. On Apr 16, 2007, at 11:31 AM, Peterson, Chris wrote: Nope, debugging is not enabled on either cluster-member instance. Check this one out, now I am finding this in my err.log file: java.lang.OutOfMemoryError: unable to create new native thread It looks like its hitting some type of native OS memory limit for creating threads? I found this article about it: http://www.talkingtree.com/blog/index.cfm/2005/3/11/NewNativeThread ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275404 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Urgent Help Please!
Jon, You are most likely correct, as the people who originally coded this site didn't know how to do a cross-database join, so instead did a SELECT * from Users, and now there are, ohhh, 26,000+ users on the site. Not to mention the SELECT * from items, which contains about 100,000+ items. Unfortunately, this code is on about 50 - 100 pages, and you can imagine that its not written for readability or ease of maintenance. I am ban aiding it for now, and working on permanent fixes for the future. Chris -Original Message- From: Jon Clausen [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 1:25 PM To: CF-Talk Subject: Re: Urgent Help Please! Chris, First of all, I defer to any of the suggestions that Jochem gives you, since he's way better in the server configuration arena than I am (or many of us, for that matter). Windows defaults out of the box to about 7200 concurrent threads (src - http://gregluck.com/blog/ archives/2004/12/limits_to_threa_1.html - and his thread-test.jar available from the same post) for the JVM, though which should be adequate in most cases if what's being served from CF is optimized. If I may, I might also suggest taking a look at the queries on your hardest hit pages. The biggest violator in CF I've found, personally, for java.lang.OutOfMemory errors has been in manipulating the results of queries that are returning a large number of records in the base query (i.e. QoQ or cfoutput query=... group=...). Sometimes this starts to happen unexpectedly when a table has grown very large over time and the original queries weren't designed to deal with recordsets on that scale.Memory issues then get progressively worse as the table grows larger until the number of records being manipulated is so large that it creates the Out of memory errors and eventually hangs the server. HTH, Jon PS - Connection reset by peer: socket write error which you also mentioned can be caused by database connectivity issues - possibly also a query issue on the DBMS side. On Apr 16, 2007, at 11:31 AM, Peterson, Chris wrote: Nope, debugging is not enabled on either cluster-member instance. Check this one out, now I am finding this in my err.log file: java.lang.OutOfMemoryError: unable to create new native thread It looks like its hitting some type of native OS memory limit for creating threads? I found this article about it: http://www.talkingtree.com/blog/index.cfm/2005/3/11/NewNativeThread ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275417 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Urgent Help Please!
Chris, I've been there and feel your pain (some from my own doing, though, so I can't throw too many stones). In the meantime, as a stop-gap you might be able to get by with adding a couple of multi-column indexes on the database side (if you haven't already) for your commonly used 'WHERE' columns to limit the number of records being parsed on the base query. If your query is: SELECT * FROM foo WHERE bar = 'FooBar' AND foo_user = 2; Create an index with the two columns: ALTER table foo ADD INDEX(bar,foo_user); This will speed things up on the DBMS side and possibly help the page execution times - freeing up more memory since CF isn't waiting around.It won't help you with the processing that CF is doing of the returned query itself, though. For that you'll need to roll up your sleeves and apply some lipstick to that pig... :-) Regards, Jon On Apr 16, 2007, at 2:14 PM, Peterson, Chris wrote: Jon, You are most likely correct, as the people who originally coded this site didn't know how to do a cross-database join, so instead did a SELECT * from Users, and now there are, ohhh, 26,000+ users on the site. Not to mention the SELECT * from items, which contains about 100,000+ items. Unfortunately, this code is on about 50 - 100 pages, and you can imagine that its not written for readability or ease of maintenance. I am ban aiding it for now, and working on permanent fixes for the future. Chris -Original Message- From: Jon Clausen [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 1:25 PM To: CF-Talk Subject: Re: Urgent Help Please! Chris, First of all, I defer to any of the suggestions that Jochem gives you, since he's way better in the server configuration arena than I am (or many of us, for that matter). Windows defaults out of the box to about 7200 concurrent threads (src - http://gregluck.com/blog/ archives/2004/12/limits_to_threa_1.html - and his thread-test.jar available from the same post) for the JVM, though which should be adequate in most cases if what's being served from CF is optimized. If I may, I might also suggest taking a look at the queries on your hardest hit pages. The biggest violator in CF I've found, personally, for java.lang.OutOfMemory errors has been in manipulating the results of queries that are returning a large number of records in the base query (i.e. QoQ or cfoutput query=... group=...). Sometimes this starts to happen unexpectedly when a table has grown very large over time and the original queries weren't designed to deal with recordsets on that scale.Memory issues then get progressively worse as the table grows larger until the number of records being manipulated is so large that it creates the Out of memory errors and eventually hangs the server. HTH, Jon PS - Connection reset by peer: socket write error which you also mentioned can be caused by database connectivity issues - possibly also a query issue on the DBMS side. On Apr 16, 2007, at 11:31 AM, Peterson, Chris wrote: Nope, debugging is not enabled on either cluster-member instance. Check this one out, now I am finding this in my err.log file: java.lang.OutOfMemoryError: unable to create new native thread It looks like its hitting some type of native OS memory limit for creating threads? I found this article about it: http://www.talkingtree.com/blog/index.cfm/2005/3/11/NewNativeThread ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275425 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Urgent Help Please!
Oh man, I would if I could. Quite honestly, the entire query is SELECT * FROM USERS Then, they have 4 - 5 other queries that QoQ back against the result set... And the query is on each page, not stuck in a shared scope. I have cleaned a few of the main pages, working on more. Once you know the trick, its pretty simple to modify the QoQ to pull directly from the DB and eliminate the SELECT * I will get there, but I think this is the bulk of my problem =) Thanks for any help guys, took me a while to dig into the err.log file for my instance and file the out of memory error. Sorry about the momentary panic =) Chris -Original Message- From: Jon Clausen [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 2:42 PM To: CF-Talk Subject: Re: Urgent Help Please! Chris, I've been there and feel your pain (some from my own doing, though, so I can't throw too many stones). In the meantime, as a stop-gap you might be able to get by with adding a couple of multi-column indexes on the database side (if you haven't already) for your commonly used 'WHERE' columns to limit the number of records being parsed on the base query. If your query is: SELECT * FROM foo WHERE bar = 'FooBar' AND foo_user = 2; Create an index with the two columns: ALTER table foo ADD INDEX(bar,foo_user); This will speed things up on the DBMS side and possibly help the page execution times - freeing up more memory since CF isn't waiting around.It won't help you with the processing that CF is doing of the returned query itself, though. For that you'll need to roll up your sleeves and apply some lipstick to that pig... :-) Regards, Jon On Apr 16, 2007, at 2:14 PM, Peterson, Chris wrote: Jon, You are most likely correct, as the people who originally coded this site didn't know how to do a cross-database join, so instead did a SELECT * from Users, and now there are, ohhh, 26,000+ users on the site. Not to mention the SELECT * from items, which contains about 100,000+ items. Unfortunately, this code is on about 50 - 100 pages, and you can imagine that its not written for readability or ease of maintenance. I am ban aiding it for now, and working on permanent fixes for the future. Chris -Original Message- From: Jon Clausen [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 1:25 PM To: CF-Talk Subject: Re: Urgent Help Please! Chris, First of all, I defer to any of the suggestions that Jochem gives you, since he's way better in the server configuration arena than I am (or many of us, for that matter). Windows defaults out of the box to about 7200 concurrent threads (src - http://gregluck.com/blog/ archives/2004/12/limits_to_threa_1.html - and his thread-test.jar available from the same post) for the JVM, though which should be adequate in most cases if what's being served from CF is optimized. If I may, I might also suggest taking a look at the queries on your hardest hit pages. The biggest violator in CF I've found, personally, for java.lang.OutOfMemory errors has been in manipulating the results of queries that are returning a large number of records in the base query (i.e. QoQ or cfoutput query=... group=...). Sometimes this starts to happen unexpectedly when a table has grown very large over time and the original queries weren't designed to deal with recordsets on that scale.Memory issues then get progressively worse as the table grows larger until the number of records being manipulated is so large that it creates the Out of memory errors and eventually hangs the server. HTH, Jon PS - Connection reset by peer: socket write error which you also mentioned can be caused by database connectivity issues - possibly also a query issue on the DBMS side. On Apr 16, 2007, at 11:31 AM, Peterson, Chris wrote: Nope, debugging is not enabled on either cluster-member instance. Check this one out, now I am finding this in my err.log file: java.lang.OutOfMemoryError: unable to create new native thread It looks like its hitting some type of native OS memory limit for creating threads? I found this article about it: http://www.talkingtree.com/blog/index.cfm/2005/3/11/NewNativeThread ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275428 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
need insert help please
First off...shouldn't you all be out doing something other than working? ;-) Since you're not out somewhere having way too much fun, I could use some enlightenment here. I have a form passing multiple values via some checkboxes, I think I've got the insert down ok for that with the following: I'm working with MySql and the week_of field I have set to unique in the db. cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=me password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop My question comes in with a form field that only needs to be inserted once for each group of songs, this value is also being passed via the form, how would I go about handling this? To muddy this up a tad more, I have a second for that handles song docs that need to be inserted and associated with the week_of insert from the first insert statement. Any help would of course be greatly appreciated! I work alone so my only source for feedback/help/direction is this and a few other lists. Thanks! Bob ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272284 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: need insert help please
Well not sure I understand the first part, but if you have a form that passes a LIST of song titles via list element to the action page You can check the DB prior to doing the insert to check if it exists or not. --- Form Action -- cfquery name=qCheckDB /cfquery !--- If record does not exist do insert --- cfif qCheckDB.recordcount eq 0 cfquery name=qInsertSong ... /cfquery !--- Get Identifier --- cfquery name=qGetMaxID Select ID from current_week where song_title eq '#item#' /cfquery !--- Do what eveer else you need with this ID and song_title --- /cfif -Original Message- From: Bob Imperial [mailto:[EMAIL PROTECTED] Sent: Saturday, March 10, 2007 6:00 PM To: CF-Talk Subject: need insert help please First off...shouldn't you all be out doing something other than working? ;-) Since you're not out somewhere having way too much fun, I could use some enlightenment here. I have a form passing multiple values via some checkboxes, I think I've got the insert down ok for that with the following: I'm working with MySql and the week_of field I have set to unique in the db. cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=me password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop My question comes in with a form field that only needs to be inserted once for each group of songs, this value is also being passed via the form, how would I go about handling this? To muddy this up a tad more, I have a second for that handles song docs that need to be inserted and associated with the week_of insert from the first insert statement. Any help would of course be greatly appreciated! I work alone so my only source for feedback/help/direction is this and a few other lists. Thanks! Bob ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272286 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: need insert help please
First off...shouldn't you all be out doing something other than working? ;-) Since you're not out somewhere having way too much fun, I could use some enlightenment here. I have a form passing multiple values via some checkboxes, I think I've got the insert down ok for that with the following: I'm working with MySql and the week_of field I have set to unique in the db. cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=me password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop My question comes in with a form field that only needs to be inserted once for each group of songs, this value is also being passed via the form, how would I go about handling this? To muddy this up a tad more, I have a second for that handles song docs that need to be inserted and associated with the week_of insert from the first insert statement. Any help would of course be greatly appreciated! I work alone so my only source for feedback/help/direction is this and a few other lists. What exactly do you mean by a group of songs? More information about your form and database schema would be helpful here. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272287 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: need insert help please
Dave...sorry for the lack of information, after read what I posted I thought I should have given a little more information. My form looks like this: form action=#self#?fuseaction=admin.selectSongs name=songSelect method=post input type=text name=week_of size=25 maxlength=50 value= / This is generated from doing a read with cfdirectory cfloop query=songs a href=songs/#name##name#/anbsp;input type=checkbox name=songTitle value=#name# / /cfloop input type=submit name=submit_songs value=Submit Songs /nbsp;input type=reset value=Clear Selections / /form I am passing this to: cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=myname password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop Working with mysql, song_id(pk) week_of, song_title and doc_title are all 3 varchars, I hope this enough information to get a better understanding of what I'm trying to do. In addition to the form above, I also have a second form setup the same way for the accompanying docs, this also built from a cfdirectory read. I guess my main question is, since the week_of field in my form is outside the loop, how do I handle that value? I sure hope this is making sense to someone ;) Thanks ...Bob What exactly do you mean by a group of songs? More information about your form and database schema would be helpful here. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272291 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: need insert help please
Dave...sorry for the lack of information, after read what I posted I thought I should have given a little more information. My form looks like this: form action=#self#?fuseaction=admin.selectSongs name=songSelect method=post input type=text name=week_of size=25 maxlength=50 value= / This is generated from doing a read with cfdirectory cfloop query=songs a href=songs/#name##name#/anbsp;input type=checkbox name=songTitle value=#name# / /cfloop input type=submit name=submit_songs value=Submit Songs /nbsp;input type=reset value=Clear Selections / /form This is a bit off your point, but why do you have links in there? If someone clicks on one of the links, they'll leave your form without finishing it. I am passing this to: cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=myname password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop Working with mysql, song_id(pk) week_of, song_title and doc_title are all 3 varchars, I hope this enough information to get a better understanding of what I'm trying to do. In addition to the form above, I also have a second form setup the same way for the accompanying docs, this also built from a cfdirectory read. I guess my main question is, since the week_of field in my form is outside the loop, how do I handle that value? I sure hope this is making sense to someone ;) I'm not sure what you're doing with week_of, but it doesn't matter whether the field is inside or outside your loop if you only want it to have one value. In your action page, you'll have week_of along with songTitle. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272294 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: need insert help please
This was copied from a separate display page I setup for band members to download their songs from, just hadn't pulled out the link refs yet. This isn't for the public, actually it's for members of a worship band from church...to make It a little easier for folks to get to their material for the coming week. This will be displayed on another page, probably only 5 or 6 as opposed to 150+ on my archive page, so the whole week_of thing comes into play there, displaying songs for that date..yada yada yada. This is a bit off your point, but why do you have links in there? If someone clicks on one of the links, they'll leave your form without finishing it. I am passing this to: cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=myname password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop I'm not seeing where to shoe-horn the week_of value into the above loop, there may be 5 or 6 song_title(s) just not seeing the syntax for it.. Thanks Dave.wellat least I survived the 60s. Which may explain some of my difficulty here ;) I'm not sure what you're doing with week_of, but it doesn't matter whether the field is inside or outside your loop if you only want it to have one value. In your action page, you'll have week_of along with songTitle. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272297 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: need insert help please
I am passing this to: cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=myname password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop I'm not seeing where to shoe-horn the week_of value into the above loop, there may be 5 or 6 song_title(s) just not seeing the syntax for it.. Is week_of a field in the current_week table? If so, you can add it to that INSERT statement. If it's a field in another table, and you want to update the value, put another query outside your CFLOOP to do this. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272298 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: need insert help please
I got it, or at least it did what I've been trying to get it to do ;) May not be elegant but it worked For some reason it didn't like #form.week_of# so I tried this and it worked cfset thisWeek = form.week_of cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# INSERT INTO current_week (week_of,song_title) VALUES ('#thisWeek#','#item#') /cfquery /cfloop Thanks for your patience and feedback Dave! It is much appreciated! Bob -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Saturday, March 10, 2007 8:03 PM To: CF-Talk Subject: RE: need insert help please I am passing this to: cfloop list=#Form.songTitle# index=item cfquery name=current_week datasource=#dsdata# username=myname password=mypwd INSERT INTO current_week (song_title) VALUES ('#item#') /cfquery /cfloop I'm not seeing where to shoe-horn the week_of value into the above loop, there may be 5 or 6 song_title(s) just not seeing the syntax for it.. Is week_of a field in the current_week table? If so, you can add it to that INSERT statement. If it's a field in another table, and you want to update the value, put another query outside your CFLOOP to do this. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272299 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Need mac users help please
All seems fine, but if I were you, I would URL Encode the names (they have spaces in them) that might be giving some problems to some people. Just a thought MD On 10 Feb 2007, at 00:25, Bob Imperial wrote: Thanks Tom ;-) I am now not going to work late tonight -Original Message- From: Tom McNeer [mailto:[EMAIL PROTECTED] Sent: Friday, February 09, 2007 3:27 PM To: CF-Talk Subject: Re: Need mac users help please Hi Bob, If someone out there on a Mac would be so kind as to check these issues for me, I would actually take the weekend off ;-) No problems for me, in either Firefox or Safari. I don't have IE for the Mac, so I don't know what would happen there. There's no reason to right-click anything. You just click the link to the file, and the browser/Mac decide what to do. In my particular case, the MP3 files opened and played using Quicktime in a new browser window or tab. For the docs, Firefox opened them in Word, while Safari downloaded and saved them. The different behavior may just be some settings preferences. But in neither case did I have any trouble accessing or using the files. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 1735 Johnson Road NE Atlanta, GA 30306 404.589.0560 ~| 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:269396 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Need mac users help please
I have some mp3 files and word docs setup and displayed using cfdirectory list, everything displays fine and the whole right-click thing works well on PC, although, I got the following message from a friend who is on a Mac. If someone out there on a Mac would be so kind as to check these issues for me, I would actually take the weekend off ;-) http://lpcband.imperialart.com Thanks!! Bob Here's what's going on as far as my mac (I haven't tried it on a PC in the office yet): When I click on an MP3 it goes to a the page could not be found page.? If I right click the song, I can ask it to open in itunes (my preferred audio player) but it won't play.? It has the title in the play box but when I click on the play button it reverts to the last song actually played in my itunes library. With the docs, if I click on one it takes me to another the page could not be found page.? I can't seem to get it to open even with a right click.? The last time I clicked on a doc it actually went to what looks to be a programers page (kind of a form type page that had some script and such). ~| 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:269318 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Need mac users help please
Hi Bob, If someone out there on a Mac would be so kind as to check these issues for me, I would actually take the weekend off ;-) No problems for me, in either Firefox or Safari. I don't have IE for the Mac, so I don't know what would happen there. There's no reason to right-click anything. You just click the link to the file, and the browser/Mac decide what to do. In my particular case, the MP3 files opened and played using Quicktime in a new browser window or tab. For the docs, Firefox opened them in Word, while Safari downloaded and saved them. The different behavior may just be some settings preferences. But in neither case did I have any trouble accessing or using the files. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 1735 Johnson Road NE Atlanta, GA 30306 404.589.0560 ~| 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:269337 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Need mac users help please
Thanks Tom ;-) I am now not going to work late tonight -Original Message- From: Tom McNeer [mailto:[EMAIL PROTECTED] Sent: Friday, February 09, 2007 3:27 PM To: CF-Talk Subject: Re: Need mac users help please Hi Bob, If someone out there on a Mac would be so kind as to check these issues for me, I would actually take the weekend off ;-) No problems for me, in either Firefox or Safari. I don't have IE for the Mac, so I don't know what would happen there. There's no reason to right-click anything. You just click the link to the file, and the browser/Mac decide what to do. In my particular case, the MP3 files opened and played using Quicktime in a new browser window or tab. For the docs, Firefox opened them in Word, while Safari downloaded and saved them. The different behavior may just be some settings preferences. But in neither case did I have any trouble accessing or using the files. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 1735 Johnson Road NE Atlanta, GA 30306 404.589.0560 ~| 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:269381 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Cookie list help please
Please check out the below code, I would like to show users a previous search history and everything seems to work ok except that on the first time through it appends the seach phrase twice. I understand why it is happening, (due to the 2nd conditional statement) but cannot figure out a better way. Maybe someone can test it out for me, and give me a pointer. Thanks a bunch!!! cookieTest.cfm !---IF OUR COOKIE IS NOT SET, SET IT NOW --- cfif not isDefined('cookie.testCookie') AND isDefined('form.test') CFCOOKIE name=testCookie value=#form.test# expires=never /cfif !---IF OUR COOKIE IS SET AND THE LEN IS LT 5, ADD TO IT--- cfif isDefined('cookie.testCookie') AND listLen(cookie.testCookie, ,) LT 6 AND isDefined('form.test') cfset searchList = listAppend(cookie.testCookie, form.test, ,) CFCOOKIE name=testCookie value=#searchList# expires=never /cfif !---IF OUR COOKIE IS LEN IS EQ 5 THEN DELETE THE FIRST ELEMENT AND APPEND THE LIST--- cfif isDefined('cookie.testCookie') AND listLen(cookie.testCookie, ,) GTE 6 AND isDefined('form.test') cfset deleted = listDeleteAt(cookie.testCookie, 1) CFCOOKIE name=testCookie value=#deleted# expires=never /cfif !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head link rel=stylesheet href=style.cfm / script function showhide(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == none){ obj.style.display = ; } else { obj.style.display = none; } } } /script body cfoutput form name=form1 action=cookieTest.cfm method=post input type=text name=test onclick=showhide('script'); return(false); /input type=submit value=Test Cookie / /form div style=display: none; position:relative; top:0px; left:0px; width:152; background-color:##DAE4E4; border: 1px solid; color:##66; id=script table width=100% cellpadding=1 cellspacing=0 border=0 tr td class=bblackfontRecent Searches/td tdimg src=images/buttn-notok.gif border=0 onclick=showhide('script'); return(false); //td /tr /cfoutput cfif isDefined('cookie.testCookie') cfloop list=#cookie.testCookie# delimiters=, index=i cfoutput tr td colspan=2 class=nblackfonta href=#i#/a/td /tr /cfoutput /cfloop /cfif /table /div /body /html Doug B. ~| 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:267116 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Solved Maybe (Cookie list help please)
I set a variable on the first creation of the cookie and checked for the existence of it in the second conditional statement, if It exists then I am not running the second block of code. Good idea...Bad idea...? So now it reads !---IF OUR COOKIE IS NOT SET, SET IT NOW --- cfif not isDefined('cookie.testCookie') AND isDefined('form.test') CFCOOKIE name=testCookie value=#form.test# expires=never !---IS THIS OUR FIRST TIME THROUGH?--- cfset firstTime = 1 /cfif !---IF OUR COOKIE IS SET AND THE LEN IS LT 6, ADD TO IT--- cfif isDefined('cookie.testCookie') AND listLen(cookie.testCookie, ,) LT 6 AND isDefined('form.test') AND not isDefined(firstTime) cfset searchList = listAppend(cookie.testCookie, form.test, ,) CFCOOKIE name=testCookie value=#searchList# expires=never /cfif Doug B. - Original Message - From: Doug Brown [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, January 22, 2007 6:45 AM Subject: Cookie list help please Please check out the below code, I would like to show users a previous search history and everything seems to work ok except that on the first time through it appends the seach phrase twice. I understand why it is happening, (due to the 2nd conditional statement) but cannot figure out a better way. Maybe someone can test it out for me, and give me a pointer. Thanks a bunch!!! cookieTest.cfm !---IF OUR COOKIE IS NOT SET, SET IT NOW --- cfif not isDefined('cookie.testCookie') AND isDefined('form.test') CFCOOKIE name=testCookie value=#form.test# expires=never /cfif !---IF OUR COOKIE IS SET AND THE LEN IS LT 5, ADD TO IT--- cfif isDefined('cookie.testCookie') AND listLen(cookie.testCookie, ,) LT 6 AND isDefined('form.test') cfset searchList = listAppend(cookie.testCookie, form.test, ,) CFCOOKIE name=testCookie value=#searchList# expires=never /cfif !---IF OUR COOKIE IS LEN IS EQ 5 THEN DELETE THE FIRST ELEMENT AND APPEND THE LIST--- cfif isDefined('cookie.testCookie') AND listLen(cookie.testCookie, ,) GTE 6 AND isDefined('form.test') cfset deleted = listDeleteAt(cookie.testCookie, 1) CFCOOKIE name=testCookie value=#deleted# expires=never /cfif !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head link rel=stylesheet href=style.cfm / script function showhide(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == none){ obj.style.display = ; } else { obj.style.display = none; } } } /script body cfoutput form name=form1 action=cookieTest.cfm method=post input type=text name=test onclick=showhide('script'); return(false); /input type=submit value=Test Cookie / /form div style=display: none; position:relative; top:0px; left:0px; width:152; background-color:##DAE4E4; border: 1px solid; color:##66; id=script table width=100% cellpadding=1 cellspacing=0 border=0 tr td class=bblackfontRecent Searches/td tdimg src=images/buttn-notok.gif border=0 onclick=showhide('script'); return(false); //td /tr /cfoutput cfif isDefined('cookie.testCookie') cfloop list=#cookie.testCookie# delimiters=, index=i cfoutput tr td colspan=2 class=nblackfonta href=#i#/a/td /tr /cfoutput /cfloop /cfif /table /div /body /html Doug B. ~| 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:267122 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Cookie list help please
Please check out the below code, I would like to show users a previous search history and everything seems to work ok except that on the first time through it appends the seach phrase twice. I understand why it is happening, (due to the 2nd conditional statement) but cannot figure out a better way. Maybe someone can test it out for me, and give me a pointer. Thanks a bunch!!! cookieTest.cfm !---IF OUR COOKIE IS NOT SET, SET IT NOW --- cfif not isDefined('cookie.testCookie') AND isDefined('form.test') CFCOOKIE name=testCookie value=#form.test# expires=never /cfif !---IF OUR COOKIE IS SET AND THE LEN IS LT 5, ADD TO IT--- cfif isDefined('cookie.testCookie') AND listLen(cookie.testCookie, ,) LT 6 AND isDefined('form.test') cfset searchList = listAppend(cookie.testCookie, form.test, ,) CFCOOKIE name=testCookie value=#searchList# expires=never /cfif !---IF OUR COOKIE IS LEN IS EQ 5 THEN DELETE THE FIRST ELEMENT AND APPEND THE LIST--- cfif isDefined('cookie.testCookie') AND listLen(cookie.testCookie, ,) GTE 6 AND isDefined('form.test') cfset deleted = listDeleteAt(cookie.testCookie, 1) CFCOOKIE name=testCookie value=#deleted# expires=never /cfif I didn't actually try running the code, but it looks like the first two of those CFIF comparisons will evaluate to true, because you're changing the evaluation conditions for the next CFIF within the previous one. When the first CFIF sets the cookie, the second CFIF's evaluation condition will become true. Instead of having three separate CFIFs, why not use CFELSE and/or CFELSEIF for some of these? cfif IsDefined(Form.test) cfif not IsDefined(Cookie.testCookie) cfset searchList = Form.test cfelse cfif ListLen(Cookie.testCookie) lt 6 cfset searchList = ListAppend(Cookie.testCookie, Form.test) cfelse cfset searchList = ListDeleteAt(Cookie.testCookie, 1) /cfif /cfif cfcookie name=testCookie value=#searchList# expires=never /cfif Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| 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:267226 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
OT: .NET Help Please
^%^$%$%$*( Now that I got that out of the way I feel a little better. I realize there is a .NET forum, but it's not used much and I am hoping for immediate help. Big database change at work this morning. I went in and changed all the dsn settings in the CFADMIN. All CF applications are up and running beautifully. A Crystal report writer built a .NET that allows users to input varaibles and passes them through to a crystal report. The application was up and running fine. However, with the DB change the programmer had to modify the DB information in the crystal report. The report works from the programmers desktop. However, when loaded onto the server it fails. With the following error. All permissions on the file, folder, and IIS are the same. I have actually gone in and opened up the permissions on the file to FULL for EVERYONE, USERS, and all other users that had access to the file. All to no avail. ANY HELP WOULD BE GREATLY APPRECIATED. Server Error in '/' Application. Error in File G:\BloodCountLoss\wwwRoot\dnHemapheresisDnrSummary.rpt: Access to report file denied. Another program may be using it. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Error in File G:\BloodCountLoss\wwwRoot\dnHemapheresisDnrSummary.rpt: Access to report file denied. Another program may be using it. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [LoadSaveReportException: Error in File G:\BloodCountLoss\wwwRoot\dnHemapheresisDnrSummary.rpt: Access to report file denied. Another program may be using it.] .F(String , EngineExceptionErrorID ) +272 .A(Int16 , Int32 ) +538 CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) +468 CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() +107 CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() +67 Rolling_RBC_Calendar.pdfFormat.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Rolling RBC Calendar\pdfFormat.aspx.vb:108 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +750 ~| 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:259224 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: .NET Help Please
The report works from the programmers desktop. However, when loaded onto the server it fails. With the following error. All permissions on the file, folder, and IIS are the same. I have actually gone in and opened up the permissions on the file to FULL for EVERYONE, USERS, and all other users that had access to the file. All to no avail. ... Error in File G:\BloodCountLoss\wwwRoot\dnHemapheresisDnrSummary.rpt: Access to report file denied. Another program may be using it. My guess is that the file is locked by something. You can probably fix this by simply rebooting the server, or if you don't want to reboot you can identify and remove the lock if possible. Google windows remove file lock for more information. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| 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:259226 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: .NET Help Please
The report works from the programmers desktop. However, when My guess is that the file is locked by something. You can probably fix this by simply rebooting the server, or if you don't want to reboot you can identify and remove the lock if possible. Google windows remove file lock for more information. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| 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:259228 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: .NET Help Please
I've tried rebooting the server to no avail. The report works from the programmers desktop. However, when My guess is that the file is locked by something. You can probably fix this by simply rebooting the server, or if you don't want to reboot you can identify and remove the lock if possible. Google windows remove file lock for more information. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| 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:259229 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: .NET Help Please
You can also use Process Explorer from Sysinternals... A fantastic tool This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Dave Watts To: CF-Talk Sent: Sun Nov 05 18:58:36 2006 Subject: RE: .NET Help Please The report works from the programmers desktop. However, when loaded onto the server it fails. With the following error. All permissions on the file, folder, and IIS are the same. I have actually gone in and opened up the permissions on the file to FULL for EVERYONE, USERS, and all other users that had access to the file. All to no avail. ... Error in File G:\BloodCountLoss\wwwRoot\dnHemapheresisDnrSummary.rpt: Access to report file denied. Another program may be using it. My guess is that the file is locked by something. You can probably fix this by simply rebooting the server, or if you don't want to reboot you can identify and remove the lock if possible. Google windows remove file lock for more information. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| 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:259231 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: ugh... CFLOGIN Help please
James - So if I understand you correctly 1) the act_Login page stores the login information to the session. 2) to get at that information you neeed to fire off the cflogin tag to pull the information into the page for use. I'll give it a shot. Thanks for your time. BN On index.cfm, you need to run a cflogin tag before the getAuthUser() function will work. This is true in any page that you intend to protect with CFLOGIN authentication. On 9/15/06, Brent Nicholas [EMAIL PROTECTED] wrote: ~| 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:253257 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: ugh... CFLOGIN Help please
This worked perfectly. It's an odd way of doing things, but it worked. Thank you, BN ~| 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:253261 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
ugh... CFLOGIN Help please
Ok, so I've searched and read the posts on this list about CFLOGIN, I've read Brandon Purcell's power point and read over all the Macromedia documentation. I'm actually using most of their code, though I've rearranged it to make more sense in what I'm doing to prove the concept. In short it works, but seems to loose the session/user once you leave the page that did the login?? Anyone know what I'm doing wrong? I'm sure it's something obvious... I'll get to the nitty gritty here. Code is laid out as follows and all lives in the same directory: -page break--- PageName.cfm -- CODE HERE --end page-- -page break--- Application.cfc -- cfcomponent output=false !--- define application variables --- cfset this.name=CFLHD_Intranet / cfset this.sessionmanagement=true / cfset this.setclientcookies=false / cfset this.loginstorage=session /cfcomponent --end page-- -page break--- index.cfm -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / titleCFLHD - Intranet/title cfsetting showdebugoutput=Yes /head body cfoutput h2Welcome #GetAuthUser()#!/h2br / #application.applicationname#br / /cfoutput cfif NOT IsDefined(cflogin) test not logged in br / cfelse test logged in br / /cfif cfif GetAuthUser() EQ a href=LoginForm.cfmLogin/a cfelse cfoutput a href=EmployeeDataPage.cfm?emp_id=#GetAuthUser()#Nicholas, Brent/a /cfoutput /cfif /body /html --end page-- -page break--- LoginForm.cfm -- H2Please Log In/H2 cfoutput form action=act_LogIn.cfm method=Post table tr tdusername:/td tdinput type=text name=j_username/td /tr tr tdpassword:/td tdinput type=password name=j_password/td /tr /table br input type=submit value=Log In /form /cfoutput --end page-- -page break--- act_LogIn.cfm -- cflogin applicationtoken=#application.applicationname# cfif cflogin.name IS OR cflogin.password IS cfoutput h2You must enter text in both the User Name and Password fields./h2 /cfoutput cfinclude template=loginform.cfm cfabort cfelse !--- remove for simplicity cfquery name=loginQuery dataSource=#request.DATASOURCE# SELECT ID, ROLE, GROUP_NAME FROM CFL_ADMIN.INTRANET_GROUPS WHERE USER_NAME = '#cflogin.name#' AND PASSWORD = '#cflogin.password#' /cfquery --- cfloginuser name=BNICHOLAS Password=EggARoll roles=ThaMan !--- removed for simplicity cfif loginQuery.ROLE NEQ cfloginuser name=#cflogin.name# Password = #cflogin.password# roles=#loginQuery.ROLE# cfelse cfoutput H2Your login information is not valid.brPlease Try again/H2 /cfoutput cfinclude template=loginform.cfm cfabort /cfif --- /cfif /cflogin cfoutput THIS WORKS FINE, SHOWS USER h2Welcome #GetAuthUser()#!/h2 THOUGH AFTER YOU CLICK THIS YOU'LL LOOSE THE DATA. a href=index.cfm?#session.urltoken#index page/a /cfoutput --end page-- ~| 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:253180 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: ugh... CFLOGIN Help please
This may make it easier to address this issue. It's all the files in a folder ready to test. http://www.cflhd.gov/TeleconfDocs/LoginTestingbak.zip Thanks again - BN Ok, so I've searched and read the posts on this list about CFLOGIN, I've read Brandon Purcell's power point and read over all the Macromedia documentation. I'm actually using most of their code, though I've rearranged it to make more sense in what I'm doing to prove the concept. In short it works, but seems to loose the session/user once you leave the page that did the login?? Anyone know what I'm doing wrong? I'm sure it's something obvious... I'll get to the nitty gritty here. Code is laid out as follows and all lives in the same directory: -page break--- PageName.cfm -- CODE HERE --end page-- -page break--- Application.cfc -- cfcomponent output=false !--- define application variables --- cfset this.name=CFLHD_Intranet / cfset this.sessionmanagement=true / cfset this.setclientcookies=false / cfset this.loginstorage=session /cfcomponent --end page-- -page break--- index.cfm -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www. w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / titleCFLHD - Intranet/title cfsetting showdebugoutput=Yes /head body cfoutput h2Welcome #GetAuthUser()#!/h2br / #application.applicationname#br / /cfoutput cfif NOT IsDefined(cflogin) test not logged in br / cfelse test logged in br / /cfif cfif GetAuthUser() EQ a href=LoginForm.cfmLogin/a cfelse cfoutput a href=EmployeeDataPage.cfm?emp_id=#GetAuthUser()#Nicholas, Brent/a /cfoutput /cfif /body /html --end page-- -page break--- LoginForm.cfm -- H2Please Log In/H2 cfoutput form action=act_LogIn.cfm method=Post table tr tdusername:/td tdinput type=text name=j_username/td /tr tr tdpassword:/td tdinput type=password name=j_password/td /tr /table br input type=submit value=Log In /form /cfoutput --end page-- -page break--- act_LogIn.cfm -- cflogin applicationtoken=#application.applicationname# cfif cflogin.name IS OR cflogin.password IS cfoutput h2You must enter text in both the User Name and Password fields. /h2 /cfoutput cfinclude template=loginform.cfm cfabort cfelse !--- remove for simplicity cfquery name=loginQuery dataSource=#request.DATASOURCE# SELECT ID, ROLE, GROUP_NAME FROM CFL_ADMIN.INTRANET_GROUPS WHERE USER_NAME = '#cflogin.name#' AND PASSWORD = '#cflogin.password#' /cfquery --- cfloginuser name=BNICHOLAS Password=EggARoll roles=ThaMan !--- removed for simplicity cfif loginQuery.ROLE NEQ cfloginuser name=#cflogin.name# Password = #cflogin.password# roles=#loginQuery.ROLE# cfelse cfoutput H2Your login information is not valid.brPlease Try again/H2 /cfoutput cfinclude template=loginform.cfm cfabort /cfif --- /cfif /cflogin cfoutput THIS WORKS FINE, SHOWS USER h2Welcome #GetAuthUser()#!/h2 THOUGH AFTER YOU CLICK THIS YOU'LL LOOSE THE DATA. a href=index.cfm?#session.urltoken#index page/a /cfoutput --end page-- ~| 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:253201 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: ugh... CFLOGIN Help please
On index.cfm, you need to run a cflogin tag before the getAuthUser() function will work. This is true in any page that you intend to protect with CFLOGIN authentication. On 9/15/06, Brent Nicholas [EMAIL PROTECTED] wrote: This may make it easier to address this issue. It's all the files in a folder ready to test. http://www.cflhd.gov/TeleconfDocs/LoginTestingbak.zip Thanks again - BN Ok, so I've searched and read the posts on this list about CFLOGIN, I've read Brandon Purcell's power point and read over all the Macromedia documentation. I'm actually using most of their code, though I've rearranged it to make more sense in what I'm doing to prove the concept. In short it works, but seems to loose the session/user once you leave the page that did the login?? Anyone know what I'm doing wrong? I'm sure it's something obvious... I'll get to the nitty gritty here. Code is laid out as follows and all lives in the same directory: -page break--- PageName.cfm -- CODE HERE --end page-- -page break--- Application.cfc -- cfcomponent output=false !--- define application variables --- cfset this.name=CFLHD_Intranet / cfset this.sessionmanagement=true / cfset this.setclientcookies=false / cfset this.loginstorage=session /cfcomponent --end page-- -page break--- index.cfm -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www. w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / titleCFLHD - Intranet/title cfsetting showdebugoutput=Yes /head body cfoutput h2Welcome #GetAuthUser()#!/h2br / #application.applicationname#br / /cfoutput cfif NOT IsDefined(cflogin) test not logged in br / cfelse test logged in br / /cfif cfif GetAuthUser() EQ a href=LoginForm.cfmLogin/a cfelse cfoutput a href=EmployeeDataPage.cfm?emp_id=#GetAuthUser()#Nicholas, Brent/a /cfoutput /cfif /body /html --end page-- -page break--- LoginForm.cfm -- H2Please Log In/H2 cfoutput form action=act_LogIn.cfm method=Post table tr tdusername:/td tdinput type=text name=j_username/td /tr tr tdpassword:/td tdinput type=password name=j_password/td /tr /table br input type=submit value=Log In /form /cfoutput --end page-- -page break--- act_LogIn.cfm -- cflogin applicationtoken=#application.applicationname# cfif cflogin.name IS OR cflogin.password IS cfoutput h2You must enter text in both the User Name and Password fields. /h2 /cfoutput cfinclude template=loginform.cfm cfabort cfelse !--- remove for simplicity cfquery name=loginQuery dataSource=#request.DATASOURCE# SELECT ID, ROLE, GROUP_NAME FROM CFL_ADMIN.INTRANET_GROUPS WHERE USER_NAME = '#cflogin.name#' AND PASSWORD = '#cflogin.password#' /cfquery --- cfloginuser name=BNICHOLAS Password=EggARoll roles=ThaMan !--- removed for simplicity cfif loginQuery.ROLE NEQ cfloginuser name=#cflogin.name# Password = #cflogin.password# roles=#loginQuery.ROLE# cfelse cfoutput H2Your login information is not valid.brPlease Try again/H2 /cfoutput cfinclude template=loginform.cfm cfabort /cfif --- /cfif /cflogin cfoutput THIS WORKS FINE, SHOWS USER h2Welcome #GetAuthUser()#!/h2 THOUGH AFTER YOU CLICK THIS YOU'LL LOOSE THE DATA. a href=index.cfm?#session.urltoken#index page/a /cfoutput --end page-- ~| 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:253207 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Help please
Have not used CF in a long time...cannot see user tables in RDS in CF Studio 5. I am using SQL 2000 and CF 5 ~| 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:248849 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 please
You can't see the tables under the DB tab, but are you able to browse files on the server? Additionally, are the user name and passwords for the data sources actually in the administrator? I know I sometimes don't do that, and pass them in to the connection through the cfquery tag, for security. If that info isn't there than you won't see the DB. 1st ensure rds is on and you can browse the server then make sure that the data sources verify properly in the administrator. -Original Message- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: Friday, August 04, 2006 6:35 PM To: CF-Talk Subject: Help please Have not used CF in a long time...cannot see user tables in RDS in CF Studio 5. I am using SQL 2000 and CF 5 ~| 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:248850 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Help please
Well, I can browse the server and the datasources cerify as ok. I can see the SQL's base tables but cannot see the user tables. Just weird. - Original Message - From: Loathe [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Friday, August 04, 2006 4:40 PM Subject: RE: Help please You can't see the tables under the DB tab, but are you able to browse files on the server? Additionally, are the user name and passwords for the data sources actually in the administrator? I know I sometimes don't do that, and pass them in to the connection through the cfquery tag, for security. If that info isn't there than you won't see the DB. 1st ensure rds is on and you can browse the server then make sure that the data sources verify properly in the administrator. -Original Message- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: Friday, August 04, 2006 6:35 PM To: CF-Talk Subject: Help please Have not used CF in a long time...cannot see user tables in RDS in CF Studio 5. I am using SQL 2000 and CF 5 ~| 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:248853 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4