RE: SQLServer2005 and European dates
I suspect you are not giving the db a date in an unambiguous format from CF, ie {ts '2010-05-12 15:45:00} You can sometimes give a date in 'native' format to a db and it will accept it, but it is essentially ambiguous ie 1/5/2010 - is this 1 may or 5th Jan? The createodbcDate() or createodbcdatetime() functions are your friend. Richard -Original Message- From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: 12 May 2010 15:10 To: cf-talk Subject: Re: SQLServer2005 and European dates Thank you Steve, but I dont think you've seen the point. The query you wrote isnt the one I'm using. you wrote: Select * From someTable Where myDate = '05-01-2010' And myDate dateAdd(m, 1, '05-01-2010'); and that gets all the May results. We're sending: Select * From someTable Where myDate = '01-05-2010' And myDate '31-05-2010'; and it gets NO May results. As i said, re-writing hundreds of queries throughout the application is NOT an option. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month On Wed, May 12, 2010 at 11:42 PM, DURETTE, STEVEN J (ATTASIAIT) sd1...@att.com wrote: Ok, so I made a mistake in my code... Here is the correction: Select * From someTable Where myDate = '05-01-2010' And myDate dateAdd(m, 1, '05-01-2010'); That code gets everything greater than or equal to 2010-05-01 00:00:00.000 and less than 2010-06-01 00:00:00.000 Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333605 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
java uploader
Dear all I've been messing around with a java applet multiple file uploader http://sourceforge.net/projects/javafileuploade/ If I do a dump of form vars from the receiving page I get this: form.RELPATHINFO1: form.FIELDNAMES: MIMETYPE1,PATHINFO1,RELPATHINFO1,FILEMODIFICATIONDATE1,FILE1,MD5SUM0 form.MIMETYPE1: application/zip form.FILE1: C:\apps\cf8\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotm p6178.tmp form.MD5SUM0: 1d5b15e6ea67c1fb85e344b6ee7dcd43 form.FILEMODIFICATIONDATE1: 08/01/2010 16:45:48 form.PATHINFO1: \\serverName\users\fred\docs As you see, CF is putting the received file in the dir stated in form.FILE1 - it is there, and I can move it to where I want, and it is intact. Problem is I don't know what the original filename was. That may be an issue with the java app, but more to the point, I'm not using CFFILE action=upload here at all so I'm probably doing something fundamentally wrong. Has anyone any guidance on how I can use this? Thanks Richard ~| 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:330333 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: imap.cfc
Yes Client doesn't want to though. Richard -Original Message- From: Adrocknaphobia [mailto:adrocknapho...@gmail.com] Sent: 29 January 2010 08:42 To: cf-talk Subject: Re: imap.cfc Or you could upgrade to CF9 for the new CFIMAP tag. ;-) -Adam On Fri, Jan 29, 2010 at 2:36 AM, Richard Meredith-Hardy r...@flymicro.comwrote: OK, thanks, I'll take a look. -Original Message- From: denstar [mailto:valliants...@gmail.com] Sent: 27 January 2010 19:56 To: cf-talk Subject: Re: imap.cfc On Wed, Jan 27, 2010 at 7:06 AM, Richard Meredith-Hardy wrote: Before I start messing with it, can someone tell me if the imap.cfc at http://www.opensourcecf.com/CFOpenMail/imapcfc_view.cfm is the latest version and works OK on CF8? That one really needs work to be functional. There's something similar that Rick and I have done some work on, that has unit tests that work with GMail (getting folders, sending mail using TLS, etc.). If it does not work with CF8, making it work should be a pretty simple matter of making sure that var scoped variables are at the top, and using structNew() vs. any cf9 structure creation syntax, etc .. If I can find my cf8 libs, I can give it a whirl, as there's some other stuff I want to test too, but if you get it to work before then, send me the changes and I'll commit them. As for the number of folders, I think the only limit is at the SMTP server. With the cfjavamail source, it should be pretty easy to add caching and whatnot for folder lookups and what have you. http://trac.getrailo.org/railotags/wiki/CfJavaMail :den -- We are celebrating the feast of the Eternal Birth which God the Father has borne and never ceases to bear in all eternity... But if it takes not place in me, what avails it? Everything lies in this, that it should take place in me. Meister Eckhar ~| 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:330334 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: imap.cfc
OK, thanks, I'll take a look. -Original Message- From: denstar [mailto:valliants...@gmail.com] Sent: 27 January 2010 19:56 To: cf-talk Subject: Re: imap.cfc On Wed, Jan 27, 2010 at 7:06 AM, Richard Meredith-Hardy wrote: Before I start messing with it, can someone tell me if the imap.cfc at http://www.opensourcecf.com/CFOpenMail/imapcfc_view.cfm is the latest version and works OK on CF8? That one really needs work to be functional. There's something similar that Rick and I have done some work on, that has unit tests that work with GMail (getting folders, sending mail using TLS, etc.). If it does not work with CF8, making it work should be a pretty simple matter of making sure that var scoped variables are at the top, and using structNew() vs. any cf9 structure creation syntax, etc .. If I can find my cf8 libs, I can give it a whirl, as there's some other stuff I want to test too, but if you get it to work before then, send me the changes and I'll commit them. As for the number of folders, I think the only limit is at the SMTP server. With the cfjavamail source, it should be pretty easy to add caching and whatnot for folder lookups and what have you. http://trac.getrailo.org/railotags/wiki/CfJavaMail :den -- We are celebrating the feast of the Eternal Birth which God the Father has borne and never ceases to bear in all eternity... But if it takes not place in me, what avails it? Everything lies in this, that it should take place in me. Meister Eckhar ~| 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:330251 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
imap.cfc
Before I start messing with it, can someone tell me if the imap.cfc at http://www.opensourcecf.com/CFOpenMail/imapcfc_view.cfm is the latest version and works OK on CF8? Has anyone some sample implementation code I can look at? Perhaps more to the point, would this work?: Client wants to file emails by a job reference number. User sends out a SMTP email from CF app with this number automatically included in the subject and/or body. Sent email is copied to an auto-generated IMAP folder based on ref. no. Recipient replies, mail comes into IMAP inbox. CF looks at this inbox from time to time, and moves recognized emails to the appropriate IMAP folder based on ref. no. or to an 'unallocated' folder for items to be dealt with manually. Once the job is complete, folder is moved to an archive folder. Advantages: Keeps all emails (received sent) pertaining to a job in one place, off the CF server. Everything accessible from anywhere using ordinary email clients. Disadvantages: This is an enterprise app, would 1000 or so active job folders be totally unmanageable? Tech problems achieving this? Thanks! Richard ~| 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:330181 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: managing emails
Hmm. Not sure what you mean, are you suggesting there should be a group for every job? There are 1000's of them. Richard -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: 16 January 2010 17:06 To: cf-talk Subject: Re: managing emails What I'm really reluctant to do, however, is build a complete webmail client on top of this when there are 1001 much better webmail clients out there than I would ever have the time (= funding) to create. Good call on your part. Currently my customer is using MS exchange, (hence Outlook OWA) though they are actively looking at cheaper alternatives eg Zimbra. I'd recommend Google Apps to them. That'll be cheaper than Zimbra, And, one of the newer features of Apps is user-managed groups, which are really just Google Groups with your domain email addresses. You could programmatically create these groups, and that would give you your correspondence record since groups keep archives. So has anyone got any good tips for systems which I could hook into from my app in a CRM-like way? You can use Salesforce from CF. Although it can be a bit tricky, it's doable. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| 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:329748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: managing emails
I don't think that matters, so long as it is a cheaper solution than Exchange or Zimbra as Dave suggests. I'm not clear on how one would use it to isolate correspondence relating to single jobs though. I'm probably being thick... Richard -Original Message- From: Cameron Childress [mailto:camer...@gmail.com] Sent: 16 January 2010 20:57 To: cf-talk Subject: Re: managing emails On Sat, Jan 16, 2010 at 12:05 PM, Dave Watts dwa...@figleaf.com wrote: I'd recommend Google Apps to them. That'll be cheaper than Zimbra, And, one of the newer features of Apps is user-managed groups, which are really just Google Groups with your domain email addresses. You could programmatically create these groups, and that would give you your correspondence record since groups keep archives. I hadn't seen this feature (user manged groups) in my Google Apps account. After seeing this email and investigating, it looks like this feature is only available in the Premier Edition and Education Edition. Worth noting while considering this as a solution. -Cameron -- Cameron Childress Sumo Consulting Inc http://www.sumoc.com --- cell: 678.637.5072 aim: cameroncf email: camer...@gmail.com ~| 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:329749 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
managing emails
Dear all I have a customer with a CF intranet app which manages ~1000 concurrent active jobs. Customer now wants to include all correspondence with each job. Of course this is quite simple by injecting some sort of CRM-like code in the subject and/or body. What I'm really reluctant to do, however, is build a complete webmail client on top of this when there are 1001 much better webmail clients out there than I would ever have the time (= funding) to create. Currently my customer is using MS exchange, (hence Outlook OWA) though they are actively looking at cheaper alternatives eg Zimbra. So has anyone got any good tips for systems which I could hook into from my app in a CRM-like way? Thanks Richard ~| 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:329729 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
xmlParse problem
In CF8 no problems, but with the same script while reading the same xml file in CF6 I'm getting the error Relative URI MicroFLAP.dtd; can not be resolved without a base URI. I bet there must be an easy fix to this, but what? Thanks Richard ~| 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:323127 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: How do you guys deploy databases to shared servers?
I think it's called SSIS or something, but awfully complicated and I never got it to work I copy production to dev by simply restoring a production backup on the dev server. For db alterations I do it all in TSQL scripts tested and known to work on the dev server, and then run on the production one. Richard -Original Message- From: Paul Kukiel [mailto:pkuk...@gmail.com] Sent: 05 January 2009 14:52 To: cf-talk Subject: Re: How do you guys deploy databases to shared servers? Yes these are the 2 that I use. I haven't even used the rest of them. Regards, Paul On Mon, Jan 5, 2009 at 12:28 AM, John M Bliss bliss.j...@gmail.com wrote: I can't live without Red-Gate... Which of them do you use to copy/duplicate/synchronise http://www.red-gate.com/products/SQL_Compare/ for DB structure. http://www.red-gate.com/products/SQL_Data_Compare/ for DB contents. On Sun, Jan 4, 2009 at 10:55 PM, Mike Kear afpwebwo...@gmail.com wrote: Thanks Paul. I see those Red gates packages are a series of $395 applications. My tiny company isn't going to afford $5000 worth of tools, or even the bundle price around $1000. Which of them do you use to copy/duplicate/synchronise databases between two servers? Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Mon, Jan 5, 2009 at 3:38 PM, Paul Kukiel pkuk...@gmail.com wrote: We recently got Red gates toolbelt SQL tools. Like you upgrading/ moving databases was time consuming and difficult. Now its just so much easier. http://www.red-gate.com/products/ SQL_Professional_Toolbelt/index.htm Paul Kukiel On 04/01/2009, at 7:30 PM, Mike Kear wrote: I'm heartily sick of the tedious way I have to spend half a day or more EACH WEEK uploading and downloading databases from my SQLServer2005 web sites. I'm going to have another go at learning the best way to do this . . Can someone please give me some help...IN the old days I used to have a DTS task running overnight automatically, copying databases to and from my dev environment to the production web sites. Since SQLServer2005 there has been no way that I can find, to create a DTS task and reuse it EACH TIME I have to create it, and regardless of whether I save the DTS task or not, it's not available next time for me to reuse. I have ot create it all over again.Needless to say it's really PISSING ME OFF! Can someone please tell me how I can create a method of copying entire databases which might have 40tables or more with the indexes, and key relationships etc from remote servers to my local database server, or conversely from my dev environment to my production server. And also how I can do this in a way that the task is repeatable without having to be created every time. I've tried using Visual Studio 2005 but that has finally defeated me. I can never find what I want to use, and the MS Help files are total gobbldegook to me. I cant make head nor tail of it. After 3 years of wrestling with Visual Studio I have had to give up. There's no way to save any file from that and reuse it. Not that I've found anyway.The best I've ever managed to do is create a solution, and run debug every time. And that takes 30 minutes to an hour to run a simple job of copying 3 tables, and ties up my machine completely for the duration. I'm sure my problem is that I'm trying to use the wrong tools, or that I just don't know how to use the tools correctly, but I'm despairing of ever getting back to the neat and tidy way I had to do this in the old SQLServer2000 days. Incidentally, just as an additional comment to my plea ... I cant use the copy database wizard, because it's a shared server and I don't have admin rights.So I cant create a database on the remote server using SQLServer management studio. For the same reason I cant create a backup and then restore it on the other server.. For the same reason I cant use replication in any way. For the same reason, detaching, FTP then attach to the other server is out as well. I think Microsoft forgot entirely about the thousands of people using shared hosting servers when they developed SQLServer2005. And I'm told there's no provision for it in the new 2008 version either. sigh So what do the rest of you people on shared hosts do?? -- Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month ~| Adobe® ColdFusion® 8 software 8 is the most
cfeclipse
Happy new year! I'm sure I used to be able to drag gifs and jpgs from the navigator to the editor and it would insert an img tag complete with dimensions Etc. Now, it just opens a new editor pane showing the source code of the image file. What am I doing wrong? Regards Richard ~| 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:317404 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Domain permissions
Dave Thankyou for this, we'll try it. (Sorry for late reply.) Richard -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: 24 November 2008 16:10 To: cf-talk Subject: Re: Domain permissions We've got a problem where the CF8 Services don't start automatically after a server reboot. Error is Event Type: Error Event Source: Service Control Manager Event Category: None Event ID: 7000 Date: 21/11/2008 Time: 10:43:24 User: N/A Computer: INTRANET01 Description: The Cold Fusion Application Server service failed to start due to the following error: The account name is invalid or does not exist, or the password is invalid for the account name specified. The thing is, I think these settings are correct, there's no problem starting it manually. The whole system is running in a domain account (or is supposed to be) I think what I want is a crib sheet to the whole setting up of permissions Etc. on Win server 2003 R2 / iis / CF8 / MSSQL 2005 to run under a domain account. Does anyone have such a thing, or know where one is? I'm not aware of any formal document that covers this in detail. In this case, I don't think it's a permissions problem anyway, since the service does start successfully with the same credentials if you start it manually. I think that the service is being started before the machine can talk to the domain controller. I would recommend that you use the DependOnService key to make it start later. http://support.microsoft.com/kb/193888 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! ~| 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:315980 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Domain permissions
Hi all We've got a problem where the CF8 Services don't start automatically after a server reboot. Error is Event Type: Error Event Source: Service Control Manager Event Category: None Event ID: 7000 Date: 21/11/2008 Time: 10:43:24 User: N/A Computer: INTRANET01 Description: The Cold Fusion Application Server service failed to start due to the following error: The account name is invalid or does not exist, or the password is invalid for the account name specified. The thing is, I think these settings are correct, there's no problem starting it manually. The whole system is running in a domain account (or is supposed to be) I think what I want is a crib sheet to the whole setting up of permissions Etc. on Win server 2003 R2 / iis / CF8 / MSSQL 2005 to run under a domain account. Does anyone have such a thing, or know where one is? Thanks Richard ~| 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:315819 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CF8 PDF Fonts
Client wants to use the font Garamond three in CF8 generated PDF's The font is available in the CF8 administrator Font Family: garamond 3 Font Face: Garamond Three Postscript Name: GaramondThree Font Type: TRUETYPE Usable in: PDF/Flashpaper CFDOCUMENT format=PDF fontembed=selective mimetype=text/html localUrl=yes filename=full/path/to/source/file.htm pageType=A4 This is in the style sheet ..despatchfmB { font-family : garamond 3, serif; font-size : 14px; color : black;} and appears correct in the generated html source used in making the pdf - on the server, so the font is installed and exists Etc. However, it is NOT appearing in the PDF. Analysis in Acrobat Professional says the font is TimesNewRoman so somewhere the font is being substituted for a default serif font while the PDF is being generated. Anyone any ideas how I use my specified font? Thanks Richard ~| 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:311718 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF8 PDF Fonts
Thanks for all suggestions. After some fiddling around I found Garamond 3 did it, but... Not in a linked style sheet. Seems to work OK if the styles are in a STYLE block in the HEAD though. Regards Richard -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: 28 August 2008 16:19 To: CF-Talk Subject: RE: CF8 PDF Fonts 2 things to look at... 1) the space might be an issue 'garamond 3' might work. 2)it might be a license issue regarding distribution of the font.. But I have no idea how that works. 3) Is the font installed on the machine, I am not sure if by default the font is embedded into the PDF or not. -- Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2008 1:11 AM To: CF-Talk Subject: CF8 PDF Fonts Client wants to use the font Garamond three in CF8 generated PDF's The font is available in the CF8 administrator Font Family: garamond 3 Font Face: Garamond Three Postscript Name: GaramondThree Font Type: TRUETYPE Usable in: PDF/Flashpaper CFDOCUMENT format=PDF fontembed=selective mimetype=text/html localUrl=yes filename=full/path/to/source/file.htm pageType=A4 This is in the style sheet ...despatchfmB { font-family : garamond 3, serif; font-size : 14px; color : black;} and appears correct in the generated html source used in making the pdf - on the server, so the font is installed and exists Etc. However, it is NOT appearing in the PDF. Analysis in Acrobat Professional says the font is TimesNewRoman so somewhere the font is being substituted for a default serif font while the PDF is being generated. Anyone any ideas how I use my specified font? Thanks Richard ~| 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:311732 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Long running process - cflock cfthread
Thanks for this. Actually the earlier response made me forget about the cleverness of cfthread in this situation and look at just using cflock which I think does the trick perfectly well. Regards Richard -Original Message- From: Rich Kroll [mailto:[EMAIL PROTECTED] Sent: 28 July 2008 03:25 To: CF-Talk Subject: Re: Long running process - cflock cfthread You could use java to manage this, take a look at creating a guarded block: http://java.sun.com/docs/books/tutorial/essential/concurrency/ guardmeth.html HTH, Rich ~| 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:309783 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Long running process - cflock cfthread
Dear all My CF8 app has a scheduled event going off every 15 mins, for the purposes of explanation I'll call this RAPID One thing it has to do can be very long running, up to a couple of hours (no, it's not my code, but all to do with the response time from a crappy old Sage line 100 accounts program). I'll call this XSLOW. Ideally, what I would like to do is for RAPID to look to see if XSLOW is not running, and kick it off in a separate thread on a sort of fire-and-forget basis, but I don't want any other instances of XSLOW kicking off until it's finished. I could do this with some sort of external flag, but if XSLOW hangs or the server gets rebooted or something there's the risk that XSLOW and its flag will get out of synch and never run again. Can CFTHREAD somehow be scoped in the application scope so RAPID can check for XSLOW's thread status every time it runs? I'm thinking that some sort of combination of CFTHREAD and CFLOCK will do the trick, but I'm at a bit of a loss to see the exact way to do it. Thanks Richard ~| 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:309768 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Annoying SequeLink JDBC Driver failure
Jochem maintain connection: What a good idea - didn't occur to me. I'll try it. Thanks Richard -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: 05 June 2008 13:40 To: CF-Talk Subject: Re: Annoying SequeLink JDBC Driver failure Richard Meredith-Hardy wrote: I have a CF8 app which gets updates from an ancient ODBC datasource at 15 min intervals. Generally it works fine, but once or twice a week it gets the error: Error Type: Database Message: Error Executing Database Query. Detail: [Macromedia][SequeLink JDBC Driver][ODBC Socket][TSODBC]FrameRead:NetRead header Looks like this error is actually in the ODBC network driver. And it seems at least a CF8 service restart and sometimes a complete server reboot is the only thing which will fix it. Has anyone any ideas how to reset the SequeLink JDBC Driver in a more graceful fashion? Preferably automatically Since the ODBC network driver is loaded in the ODBC Server process I would expect a restart of the ODBC Service to fix any problems between the ODBC Service and the remote database. Just uncheck the maintain connection checkbox for the connection between CF and the ODBC Service to make sure that connection gets reset every time (I don't think that will have significant performance impact compared to talking to a remote database). Jochem ~| 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:306946 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF Studio 5
I bit the bullet and moved from CF Studio 5 to CFEclipse. I found the initial learning curve to get it all set up how I wanted was rather steep. With three months at it now, I won't be going back, but on balance I still think CF Studio 5 is hard to beat; really the only reason I'm using CFEclipse is because it's useful to have CF8 syntax (though it seems to fail on some 'original' tags like CFFILE). Richard -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: 04 June 2008 23:17 To: CF-Talk Subject: Re: CF Studio 5 y'know, somebody's bound to say it... so i'll just throw out a suggestion that this might be a good time to check out eclipse and cfeclipse :) hey, if you try it and don't like it, you can always resume the search for CF Studio 5. Won't cost you anything in the interim. On Wed, Jun 4, 2008 at 3:02 PM, Dave Long [EMAIL PROTECTED] wrote: I've had to reformat my computer after 5years of faithful service. After re-installing Macromedia Studio MX, I realized it only has Homesite 5.0+. Does anyone know where I can download a copy of ColdFusion Studio 5.0? Of course, they are very similar but there seem to be some features that are different. Adobe has insulated itself rather well from users who don't upgrade so I'm hoping someone here knows of a safe download site. Dave Long NorthGoods Merchant Services 103 E. Wisconsin Avenue Tomahawk, WI 54487-1471 (715) 453-7414 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ~| 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:306947 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Anything wrong with this code?
As this is a bulk insert sort of query you should be able to insert what are effectively constants relative to all the rows you're inserting, for example: insert into hmls_commercial ( mls_number,INSERTED_BY,INSERTED_ON ) select mls_number,'Rick',#createodbcdatetime(now())# from hmls_commercial_temp where mls_number not in ( select substring_index(mls_number, '_', 1 ) as mls_num from hmls_commercial ) Will put 'Rick' and the current date-time in every inserted row. If you need to be more dynamic than this you'll have to select ID's with a 'not in' query like the above and then loop over them inserting each new row individually. hth Richard -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 05 June 2008 19:42 To: CF-Talk Subject: RE: Anything wrong with this code? Ok, that's working (using a different table for the insert, 'hmls_commercial' rather than the 'properties' table for testing) with this code insert into hmls_commercial ( mls_number ) select mls_number from hmls_commercial_temp where mls_number not in ( select substring_index(mls_number, '_', 1 ) as mls_num from hmls_commercial ) I had to use 'substring_index...' because the mls_number in the final table is tagged with _h or _s depending on which MLS the property data is from. The final issue with this query, however, is how do I insert values that are not in the table supplying the data. What I mean is, when I run the query, I need to insert extra data into the target table, such as: values ( cfqueryparam cfsqltype='cf_sql_varchar' value='hmls', cfqueryparam cfsqltype='cf_sql_varchar' value='#mls_number#_h' ) How would I write the query so I can specify other values to be inserted? I had this same problem using the 'dual' function in mysql... it checked for the duplicates, but I couldn't insert additional values because the column count didn't match. At least I couldn't figure out a way to do it. But is it possible to modify your query for the additional values, Jochem? Thanks, Rick -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2008 1:58 PM To: CF-Talk Subject: Re: Anything wrong with this code? Rick Faircloth wrote: (Simplified version... MySQL 5) cfloop query='get_hmls_commercial_data' cfquery name='insert_data' datasource='x' Do get_hmls_commercial_data and insert_data query the same database? In that case you should do: INSERT INTO properties (mls_number) SELECT ... FROM ... WHERE mls_number NOT IN ( SELECT mls_number FROM properties ) Jochem ~| 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:306948 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Annoying SequeLink JDBC Driver failure
I have a CF8 app which gets updates from an ancient ODBC datasource at 15 min intervals. Generally it works fine, but once or twice a week it gets the error: Error Type: Database Message: Error Executing Database Query. Detail: [Macromedia][SequeLink JDBC Driver][ODBC Socket][TSODBC]FrameRead:NetRead header This is unavoidable and could be caused by any number of reasons, primarily because the datasource is the other side of London, but what happens next is the problem; from then onwards CF8 seems to get 'stuck' with the error: Error Type: Database Message: Error Executing Database Query. Detail: [Macromedia][SequeLink JDBC Driver]An internal error occurred. And it seems at least a CF8 service restart and sometimes a complete server reboot is the only thing which will fix it. Has anyone any ideas how to reset the SequeLink JDBC Driver in a more graceful fashion? Preferably automatically Regards Richard ~| 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:306874 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
requestTimeout behaviour
Of course I could mess about with experiments, but can somebody tell me how CFSETTING requesttimeout=seconds behaves in CF8? Specifically: I have a series of quite long running operations which are scheduled to occur every 15 min, what I want to avoid is the total overrunning 15 min so another instance starts before the last one has finished. (this is retreiving stuff down a leased line which is usually fast but sometimes very slow). so, if: I put a timeout of 5 min (300) on Operation A and then a timeout of 3 min (180) on Operation B and then Operation A completes in 1 min, does the new timeout on operation B have a further 3 min to run the request, or is the OVERALL timeout of the request actually reduced to 3 min, so in fact I have only 2 min to run before it times out? Note that I don't want to use CFTHREAD with this, because it's important Operation A completes before Operation B starts. The logic of the thing stops Operation B running at all if Operation A fails to complete. Thanks Richard ~| 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:305684 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: requestTimeout behaviour
Yes, this is probably correct, but if you start off with a timeout of, say 600 sec, and then later in the script set a timeout of 300, is it: a) 900 for the whole script (ie cumulative) b) 300 for the whole script (ie reset) c) actual time taken before 2nd reset + that value. Richard -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 20 May 2008 11:25 To: CF-Talk Subject: RE: requestTimeout behaviour I'm gonna take a stab and say that cfsetting requesttimeout=seconds only works for the request and not the individual actions/calls etc. in the request. Adrian http://www.adrianlynch.co.uk/ -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 20 May 2008 10:09 To: CF-Talk Subject: requestTimeout behaviour Of course I could mess about with experiments, but can somebody tell me how CFSETTING requesttimeout=seconds behaves in CF8? Specifically: I have a series of quite long running operations which are scheduled to occur every 15 min, what I want to avoid is the total overrunning 15 min so another instance starts before the last one has finished. (this is retreiving stuff down a leased line which is usually fast but sometimes very slow). so, if: I put a timeout of 5 min (300) on Operation A and then a timeout of 3 min (180) on Operation B and then Operation A completes in 1 min, does the new timeout on operation B have a further 3 min to run the request, or is the OVERALL timeout of the request actually reduced to 3 min, so in fact I have only 2 min to run before it times out? Note that I don't want to use CFTHREAD with this, because it's important Operation A completes before Operation B starts. The logic of the thing stops Operation B running at all if Operation A fails to complete. Thanks Richard ~| 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:305705 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: requestTimeout behaviour
To reply to myself, I think the answer is b): http://www.bennadel.com/blog/626-CFSetting-RequestTimeout-Updates-Timeouts-I t-Does-Not-Set-Them.htm -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 20 May 2008 15:07 To: CF-Talk Subject: RE: requestTimeout behaviour Yes, this is probably correct, but if you start off with a timeout of, say 600 sec, and then later in the script set a timeout of 300, is it: a) 900 for the whole script (ie cumulative) b) 300 for the whole script (ie reset) c) actual time taken before 2nd reset + that value. Richard -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 20 May 2008 11:25 To: CF-Talk Subject: RE: requestTimeout behaviour I'm gonna take a stab and say that cfsetting requesttimeout=seconds only works for the request and not the individual actions/calls etc. in the request. Adrian http://www.adrianlynch.co.uk/ -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 20 May 2008 10:09 To: CF-Talk Subject: requestTimeout behaviour Of course I could mess about with experiments, but can somebody tell me how CFSETTING requesttimeout=seconds behaves in CF8? Specifically: I have a series of quite long running operations which are scheduled to occur every 15 min, what I want to avoid is the total overrunning 15 min so another instance starts before the last one has finished. (this is retreiving stuff down a leased line which is usually fast but sometimes very slow). so, if: I put a timeout of 5 min (300) on Operation A and then a timeout of 3 min (180) on Operation B and then Operation A completes in 1 min, does the new timeout on operation B have a further 3 min to run the request, or is the OVERALL timeout of the request actually reduced to 3 min, so in fact I have only 2 min to run before it times out? Note that I don't want to use CFTHREAD with this, because it's important Operation A completes before Operation B starts. The logic of the thing stops Operation B running at all if Operation A fails to complete. Thanks Richard ~| 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:305709 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: closing JDBC recordsets
No, it's a SAGE proprietary db format, I forget its actual name, the ODBC driver is theirs too. Suffice to say if you do a search for SAGE line 100 and ODBC and 'flaky' you get quite a few results These days I think SAGE are using mssql or mysql as the core of their accounts systems but despite my efforts to get my client to upgrade, so far he has no desire to, so I'm stuck with the thing. I think I'll stick with using the jdbc:odbc bridge which at least seems to work in CF8; previously I could only communicate with the thing via CF5. As suggested, my CFC always converts the jdbc recordset into a cf query even if in some cases there is an unnecessary overhead, and then the jdbc recordsets can always be closed gracefully. As an aside, it doesn't help that in line 100 a lot of the column names have # in them, as in ADDRESS_LINE#1 Thanks for all your suggestions anyway. Richard -Original Message- From: denstar [mailto:[EMAIL PROTECTED] Sent: 02 May 2008 07:40 To: CF-Talk Subject: Re: closing JDBC recordsets Is there any possibility that the database file format is DBASE? That's the jdbc driver I was using for clipper, I think. Maybe it's foxpro or something? You might be able to find a more native driver, is what I'm, um, driving at. -- Time is bunk. Douglas Adams On Thu, May 1, 2008 at 8:40 AM, Richard Meredith-Hardy [EMAIL PROTECTED] wrote: In fact I'd tried this combination, but I tried again, and no, doesn't work, same as many other variants I've tried. I've studied the two neos you suggest, the most interesting thing I found is in neo-query.xml where jdbc-odbc-bridge has an attribute 'handler' with a value pointing at jdbcodbc.cfm which is in CFIDE\administrator\datasources\ I thought this might contain some interesting clues, but this cfm file is encrypted... Richard -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: 01 May 2008 13:44 To: CF-Talk Subject: RE: closing JDBC recordsets You're right, a standard datasource would be much better, my direct access code which works (CF 8.1) is: cfobject type=JAVA action=Create name=Class class=java.lang.Class cfset Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) cfobject type=JAVA action=Create name=DriverManager class=java.sql.DriverManager cfset con = DriverManager.getConnection(jdbc:odbc:SAGE1;UID=xxx; PWD=yyy;) cfset st = con.createStatement() cfset rs = st.executeQuery(#sql#) Any suggestions what should go where in the administrator? I've tried quite a few combinations of settings for an 'other' type datasource, some 'verify', but if you run a query against the DS I always get: Error Executing Database Query. Option out of range If you take a look at neo-query.xml and neo-datasources.xml, you should see the values used when you create a normal datasource. You should be able to reverse-engineer that a bit to figure out which values go where. That said, I think these would be the right values: JDBC URL: jdbc:odbc:SAGE1; Driver Class: sun.jdbc.odbc.JdbcOdbcDriver Driver Name: JdbcOdbcDriver Username: whatever you're putting in UID above Password: whatever you're putting in PWD above Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.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:304631 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
mail attachments prob
Sending a mail with an attachment. (works fine without) Can someone explain why code which works fine in CF5 won't work in CF8? Error in mail log is: IOException while sending message I can't see anything immediately obvious from the documentation, a mime type or something? (these attachments are always pdf's) Thanks Richard ~| 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:304634 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: mail attachments prob
Don't worry, found it. In this case I was copying a file from one with a uuid name to one with a sensible name to send, sending it in cfmail, and then deleting it. In CF5 this was fine, but the copy was clearly being deleted in cf8 before cfmail got round to actually dealing with the attached file, hence the error. Richard -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 02 May 2008 12:29 To: CF-Talk Subject: mail attachments prob Sending a mail with an attachment. (works fine without) Can someone explain why code which works fine in CF5 won't work in CF8? Error in mail log is: IOException while sending message I can't see anything immediately obvious from the documentation, a mime type or something? (these attachments are always pdf's) Thanks Richard ~| 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:304649 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: closing JDBC recordsets
You're right, a standard datasource would be much better, my direct access code which works (CF 8.1) is: cfobject type=JAVA action=Create name=Class class=java.lang.Class cfset Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) cfobject type=JAVA action=Create name=DriverManager class=java.sql.DriverManager cfset con = DriverManager.getConnection(jdbc:odbc:SAGE1;UID=xxx; PWD=yyy;) cfset st = con.createStatement() cfset rs = st.executeQuery(#sql#) Any suggestions what should go where in the administrator? I've tried quite a few combinations of settings for an 'other' type datasource, some 'verify', but if you run a query against the DS I always get: Error Executing Database Query. Option out of range These are the possible settings CF Data Source Name = JDBC URL = Driver Class = Driver Name = User Name = Password = Regards Richard -Original Message- From: denstar [mailto:[EMAIL PROTECTED] Sent: 01 May 2008 06:48 To: CF-Talk Subject: Re: closing JDBC recordsets On Wed, Apr 30, 2008 at 11:36 PM, Richard Meredith-Hardy [EMAIL PROTECTED] wrote: I did try, but without success. I suppose you're right though. I'll have another go at it. You can always implement your own pooling, if you want. Just more typing. :-) ~| 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:304566 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: closing JDBC recordsets
Sage line 100 is an ancient beast and I would use a normal cf datasource if I could, but it doesn't work. It does in CF5 but in CF8.1, it shows OK in the status column of the Data sources page, also when I 'verify' it, but when I run a query from a page which works OK in CF5: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver]Network problem, session aborted due to internal error in remote procedure call, connection closed. SQLSTATE HY000 SQLSELECT ACCOUNT_NUMBER, ACCOUNT_NAME FROM SALES_LEDGER VENDORERRORCODE 2217 DATASOURCE SAGE1 Additionally, when I get this error, I get a Visual studio Just-in-Time Debugger window popping up on the server (this is a dev server) with the message: An unhandled exception occurred in swsoc.exe [6138] You then have to restart the CF service, so it's pretty catastrophic. The only way I've succesfully communicated with the DB in CF8 is by a direct JDBC connection (code below) but I'd prefer to do it in a more standard way if I could Richard -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: 01 May 2008 09:13 To: CF-Talk Subject: RE: closing JDBC recordsets You're right, a standard datasource would be much better, my direct access code which works (CF 8.1) is: cfobject type=JAVA action=Create name=Class class=java.lang.Class cfset Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) cfobject type=JAVA action=Create name=DriverManager class=java.sql.DriverManager cfset con = DriverManager.getConnection(jdbc:odbc:SAGE1;UID=xxx; PWD=yyy;) cfset st = con.createStatement() cfset rs = st.executeQuery(#sql#) Any suggestions what should go where in the administrator? I've tried quite a few combinations of settings for an 'other' type datasource, some 'verify', but if you run a query against the DS I always get: Error Executing Database Query. Option out of range If you're using an ODBC datasource, why not just use the ODBC Socket datasource option in CF? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.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:304568 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: closing JDBC recordsets
In fact I'd tried this combination, but I tried again, and no, doesn't work, same as many other variants I've tried. I've studied the two neos you suggest, the most interesting thing I found is in neo-query.xml where jdbc-odbc-bridge has an attribute 'handler' with a value pointing at jdbcodbc.cfm which is in CFIDE\administrator\datasources\ I thought this might contain some interesting clues, but this cfm file is encrypted... Richard -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: 01 May 2008 13:44 To: CF-Talk Subject: RE: closing JDBC recordsets You're right, a standard datasource would be much better, my direct access code which works (CF 8.1) is: cfobject type=JAVA action=Create name=Class class=java.lang.Class cfset Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) cfobject type=JAVA action=Create name=DriverManager class=java.sql.DriverManager cfset con = DriverManager.getConnection(jdbc:odbc:SAGE1;UID=xxx; PWD=yyy;) cfset st = con.createStatement() cfset rs = st.executeQuery(#sql#) Any suggestions what should go where in the administrator? I've tried quite a few combinations of settings for an 'other' type datasource, some 'verify', but if you run a query against the DS I always get: Error Executing Database Query. Option out of range If you take a look at neo-query.xml and neo-datasources.xml, you should see the values used when you create a normal datasource. You should be able to reverse-engineer that a bit to figure out which values go where. That said, I think these would be the right values: JDBC URL: jdbc:odbc:SAGE1; Driver Class: sun.jdbc.odbc.JdbcOdbcDriver Driver Name: JdbcOdbcDriver Username: whatever you're putting in UID above Password: whatever you're putting in PWD above Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.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:304579 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
closing JDBC recordsets
Let me say first off that I'm not very experienced with cfc's. Code below is a cfc to query a sage line 100 accounting db from cf8.1 This works, a normal query via a regular datasource type ODBC socket doesn't (though it does in CF5). My question: I understand that when using JDBC it is important to make sure you close each resultset, statement and connection. You'll notice I'm outputting a JDBC recordset from the method sQuery in the var jdbcRecordset. I'd like to do this so I can do various other things with it in the next stage (ie actually call sQuery from other methods in the cfc) BUT - by passing it like this, is it actually closing the connection, or am I going to end up gobbling up memory because it's passed it by reference and actually kept it open? Thanks Richard the script: = cfcomponent displayname=sageQuery output=false hint=Handles the reading and output of data from sage. cffunction name=Init access=public returntype=sageQuery output=false hint=Returns an initialized sageQuery instance. !--- Return This reference. --- cfreturn THIS / /cffunction CFFUNCTION name=sQuery hint=Returns a java recordset from the query CFARGUMENT name=datasource required=true hint=ODBC datasource name of the sage db to be queried CFARGUMENT name=sql required=true hint=SQL to run in the sage query CFSET var uid = xxx CFSET var pwd = yyy CFSET var jdbcRecordset = cftry !--- This cfobject creates a java object of type Class. Leave this statement as it is. --- cfobject type=JAVA action=Create name=Class class=java.lang.Class !--- The java class name for your driver is the argument for Class.forName --- cfset Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) !--- This cfobject creates a DriverManager java object which provides your connection --- cfobject type=JAVA action=Create name=DriverManager class=java.sql.DriverManager !--- The getConnection method takes the JDBC URL for your driver as its arguement --- !--- jdbc:odbc:[datasource];[UID=username]; [PWD=password];[args] --- cfset con = DriverManager.getConnection(jdbc:odbc:#ARGUMENTS.datasource#;UID=#uid#; PWD=#pwd#;) !--- the createStatement method takes no arguments --- cfset st = con.createStatement() !--- Your query statement is the argument for executeQuery --- !--- cfset rs = st.executeQuery(SELECT ACCOUNT_NAME, ACCOUNT_NUMBER FROM SALES_LEDGER) --- cfset rs = st.executeQuery(#sql#) !--- cfset ourQuery = resultSetToQuery(rs) --- cfset jdbcRecordset = rs !--- When using JDBC it is important to make sure you close each resultset, statement and connection. This is done in the next block of code. --- cfset rs.close() cfset st.close() cfset con.close() cfcatch cfdump label=Error 1 var=#cfcatch#cfabort /cfcatch /cftry CFRETURN jdbcRecordset /CFFUNCTION /cfcomponent = ~| 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:304458 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: closing JDBC recordsets
Actually, to answer my own question, I think that if I call the close() method for the passed JDBC recordset after I've done with using it in other methods then this should do the trick. Am I right? Richard -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 30 April 2008 09:55 To: CF-Talk Subject: closing JDBC recordsets Let me say first off that I'm not very experienced with cfc's. Code below is a cfc to query a sage line 100 accounting db from cf8.1 This works, a normal query via a regular datasource type ODBC socket doesn't (though it does in CF5). My question: I understand that when using JDBC it is important to make sure you close each resultset, statement and connection. You'll notice I'm outputting a JDBC recordset from the method sQuery in the var jdbcRecordset. I'd like to do this so I can do various other things with it in the next stage (ie actually call sQuery from other methods in the cfc) BUT - by passing it like this, is it actually closing the connection, or am I going to end up gobbling up memory because it's passed it by reference and actually kept it open? Thanks Richard the script: = cfcomponent displayname=sageQuery output=false hint=Handles the reading and output of data from sage. cffunction name=Init access=public returntype=sageQuery output=false hint=Returns an initialized sageQuery instance. !--- Return This reference. --- cfreturn THIS / /cffunction CFFUNCTION name=sQuery hint=Returns a java recordset from the query CFARGUMENT name=datasource required=true hint=ODBC datasource name of the sage db to be queried CFARGUMENT name=sql required=true hint=SQL to run in the sage query CFSET var uid = xxx CFSET var pwd = yyy CFSET var jdbcRecordset = cftry !--- This cfobject creates a java object of type Class. Leave this statement as it is. --- cfobject type=JAVA action=Create name=Class class=java.lang.Class !--- The java class name for your driver is the argument for Class.forName --- cfset Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) !--- This cfobject creates a DriverManager java object which provides your connection --- cfobject type=JAVA action=Create name=DriverManager class=java.sql.DriverManager !--- The getConnection method takes the JDBC URL for your driver as its arguement --- !--- jdbc:odbc:[datasource];[UID=username]; [PWD=password];[args] --- cfset con = DriverManager.getConnection(jdbc:odbc:#ARGUMENTS.datasource#; UID=#uid#; PWD=#pwd#;) !--- the createStatement method takes no arguments --- cfset st = con.createStatement() !--- Your query statement is the argument for executeQuery --- !--- cfset rs = st.executeQuery(SELECT ACCOUNT_NAME, ACCOUNT_NUMBER FROM SALES_LEDGER) --- cfset rs = st.executeQuery(#sql#) !--- cfset ourQuery = resultSetToQuery(rs) --- cfset jdbcRecordset = rs !--- When using JDBC it is important to make sure you close each resultset, statement and connection. This is done in the next block of code. --- cfset rs.close() cfset st.close() cfset con.close() cfcatch cfdump label=Error 1 var=#cfcatch#cfabort /cfcatch /cftry CFRETURN jdbcRecordset /CFFUNCTION /cfcomponent = ~| 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:304459 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: closing JDBC recordsets
I'm not very clear on this var thing in as much as cfset Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) works, but cfset var Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) throws the error: You cannot use a variable reference with . operators in this context hence some vars are not scoped locally. Yes, I can convert it into a cfquery object, and a lot of the time I will, but I also want to be able to insert the data into another table in another db which I can do directly rather than converting it to a query first. Hence the reason to split it into separate methods. Sage line 100 is an ancient beast and I would use a normal cf datasource if I could, but it doesn't work in cf8 hence the reason for doing it manually, which does. Regards Richard -Original Message- From: C S [mailto:[EMAIL PROTECTED] Sent: 30 April 2008 14:08 To: CF-Talk Subject: Re: closing JDBC recordsets Actually, to answer my own question, I think that if I call the close() method for the passed JDBC recordset after I've done with using it in other methods then this should do the trick. Am I right? Actually, to answer my own question, I think that if I call the close() method for the passed JDBC recordset after I've done with using it in other methods then this should do the trick. Am I right? I would consider converting the resultset into a CF query object, and returning a query from the function instead. Also check your function local variables. I do not think all of them are properly VAR scoped. BTW, are you connecting using a datasource or making a direct connection to a database? IIRC opening and closing database connections manually can often be more expensive than using a fixed datasource (with connection pooling enabled). When connection pooling is enabled, queries just grab an already open connection from the pool, rather than opening and closing them each time a statement is executed. ~| 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:304491 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: closing JDBC recordsets
I did try, but without success. I suppose you're right though. I'll have another go at it. Richard -Original Message- From: denstar [mailto:[EMAIL PROTECTED] Sent: 30 April 2008 23:05 To: CF-Talk Subject: Re: closing JDBC recordsets On Wed, Apr 30, 2008 at 8:02 AM, Richard Meredith-Hardy [EMAIL PROTECTED] wrote: Sage line 100 is an ancient beast and I would use a normal cf datasource if I could, but it doesn't work in cf8 hence the reason for doing it manually, which does. If you can do it in a CFC, you can create a DSN for it in the CF administrator. Just use the same values you're using to create it by hand (after specifying Other or whatever as the DSN connection type). I was talking to a clipper database for years... poor bastard was put down eventually, thank god, but I talked to it through a DSN. Pools are the way to go, if you're doing anything heavy/often. : -- If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands. Douglas Adams ~| 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:304562 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Can you guys give me your thoughts on this?
Below is a table audit setup. Without changing any table or field names and rather customized by me from the basic original, but I hope you'll get the idea; in MSSQL create the audit table == /** Object: Table [dbo].[ALLCONTACTSHISTORY]Script Date: 04/07/2008 19:19:59 **/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[ALLCONTACTSHISTORY]( [AUDITREF] [int] IDENTITY(1,1) NOT NULL, [AUDITTYPE] [char](1) NOT NULL, [COLUMN_NAME] [varchar](128) NOT NULL, [USERREF] [int] NOT NULL, [OLDVALUE] [varchar](8000) NULL, [NEWVALUE] [varchar](8000) NULL, [UPDATED] [datetime] NOT NULL, [BYWHO] [varchar](128) NOT NULL, CONSTRAINT [PK_ALLCONTACTSHISTORY] PRIMARY KEY CLUSTERED ( [AUDITREF] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO /* == create the trigger on ALLCONTACTS which fills the audit table == */ /** Object: Trigger [dbo].[TR_AUDIT_ALLCONTACTS]Script Date: 04/07/2008 19:09:58 **/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE trigger [dbo].[TR_AUDIT_ALLCONTACTS] on [dbo].[ALLCONTACTS] FOR INSERT, UPDATE, DELETE AS declare @bit int , @field int , @maxfield int , @char int , @fieldname varchar(128) , @TableName varchar(128) , @PKCols varchar(1000) , @sql varchar(2000), @UpdateDate varchar(21) , @UserName varchar(128) , @Type char(1) , @PKSelect varchar(1000), @jobref int, @doIt bit set @TableName = 'ALLCONTACTS' set @doIt = 1 -- date and user SELECT @UserName = ISNULL(BYWHO,'Unknown') FROM inserted select @UpdateDate = convert(varchar(8), getdate(), 112) + ' ' + convert(varchar(12), getdate(), 114) -- Special username 'SysAdmin' to NOT insert anything into audit table if @UserName = 'SysAdmin' set @doIt = 0 -- Action if @doit = 1 BEGIN if exists (select * from inserted) if exists (select * from deleted) select @Type = 'U' else select @Type = 'I' else select @Type = 'D' -- get list of columns select * into #ins from inserted select * into #del from deleted -- Get primary key columns for full outer join select @PKCols = coalesce(@PKCols + ' and', ' on') + ' i.' + c.COLUMN_NAME + ' = d.' + c.COLUMN_NAME fromINFORMATION_SCHEMA.TABLE_CONSTRAINTS pk , INFORMATION_SCHEMA.KEY_COLUMN_USAGE c where pk.TABLE_NAME = @TableName and CONSTRAINT_TYPE = 'PRIMARY KEY' and c.TABLE_NAME = pk.TABLE_NAME and c.CONSTRAINT_NAME = pk.CONSTRAINT_NAME if @PKCols is null begin raiserror('no PK on table %s', 16, -1, @TableName) return end select @field = 0, @maxfield = max(ORDINAL_POSITION) from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = @TableName while @field @maxfield begin select @field = min(ORDINAL_POSITION) from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = @TableName and ORDINAL_POSITION @field select @bit = (@field - 1 )% 8 + 1 select @bit = power(2,@bit - 1) select @char = ((@field - 1) / 8) + 1 if substring(COLUMNS_UPDATED(),@char, 1) @bit 0 or @Type in ('I','D') begin select @fieldname = COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = @TableName and ORDINAL_POSITION = @field select @sql = 'insert ALLCONTACTSHISTORY (AUDITTYPE, USERREF,COLUMN_NAME, OLDVALUE, NEWVALUE, UPDATED, BYWHO)' select @sql = @sql +' select ''' + @Type + select @sql = @sql +', i.USERREF' select @sql = @sql +',''' + @fieldname + select @sql = @sql +', ISNULL(CASE WHEN len(convert(varchar(1000),d.' + @fieldname + ')) = 0 THEN ''[blank]'' WHEN ISDATE(convert(varchar(20),d.' + @fieldname + '))=1 THEN convert(varchar(17),d.' + @fieldname +', 113) ELSE convert(varchar(1000),d.' + @fieldname + ') END,''[blank]'')' select @sql = @sql +', ISNULL(CASE WHEN len(convert(varchar(1000),i.' + @fieldname + ')) = 0 THEN ''[blank]'' WHEN ISDATE(convert(varchar(20),i.' + @fieldname + '))=1 THEN convert(varchar(17),i.' + @fieldname +', 113) ELSE convert(varchar(1000),i.' + @fieldname + ') END,''[blank]'')'
CF8 datasource problem
An ODBC connection to a SAGE line-100 accounts database works perfectly well in CF5 but I can't get it to work at all in CF8 on the same server. (Win2k3 R2 sp2) In CF8, it shows OK in the status column of the Data sources page, also when I 'verify' it, but when I run a query from a page which works OK in CF5: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver]Network problem, session aborted due to internal error in remote procedure call, connection closed. SQLSTATE HY000 SQLSELECT ACCOUNT_NUMBER, ACCOUNT_NAME, THIS_RECORD, PARENT_RECORD FROM SALES_LEDGER VENDORERRORCODE 2217 DATASOURCE SAGE_NMCDATA Additionally, when I get this error, on the server I get a Visual studio Just-in-Time Debugger window popping up with the message: An unhandled exception occurred in swsoc.exe [6138] Has anyone any ideas? Thanks Richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300404 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF8 datasource problem
Tom See below -Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: 04 March 2008 16:23 To: CF-Talk Subject: Re: CF8 datasource problem On Tuesday 04 Mar 2008, Richard Meredith-Hardy wrote: An ODBC connection to a SAGE line-100 accounts database works perfectly What database ? Sage's own one ? I believe so, yes. Unfortunately if you do a search on SAGE line 100 and ODBC and 'flaky' or 'unreliable' you get a suprising lot of answers for what is supposed to be 'Britain's No. 1 accounts software'. Also, rather unfortunately I have no option (apart from my efforts to pursuade my client to upgrade his accounts system to something a bit more modern). It does seem to be a bit of a dead-end this one, one hint I found is that the sage ODBC driver isn't ODBC 3 compliant which may explain why it works in CF5 but not CF8 Nevertheless, I was hoping someone might have found a solution. If not, then I'll have to keep CF5 going, doing regular loads into an intermediate mssql db. Not ideal, but workable. VENDORERRORCODE 2217 What does this code mean ? I've absolutely no idea. SAGE charge £1500 for the SDK. Additionally, when I get this error, on the server I get a Visual studio Just-in-Time Debugger window popping up with the message: An unhandled exception occurred in swsoc.exe [6138] What's that .exe ? Why is Studio running/installed ? swsoc.exe is a process associated with the Cold Fusion server from Macromedia Studio: I don't really know, something to do with MSSQL server perhaps? This is my dev box, the 'Business intelligence development studio' is all part of the studio empire isn't it? -- Tom Chiverton Helping to quickly benchmark scalable applications 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 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. 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 Solicitors Regulation Authority. 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 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300427 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: trouble with cfExchange
Tom Eureka! Simple when you know how. It was the mailboxname which did it; on my system it's different to [EMAIL PROTECTED] which I suppose it tries by default. Thankyou so much. Richard -Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: 27 February 2008 10:12 To: CF-Talk Subject: Re: trouble with cfExchange On Tuesday 26 Feb 2008, Richard Meredith-Hardy wrote: does cfExchange deal with the /exchange bit automatically? It seems to here. We're using cfexchangeconnection as we do a few things each run, but broadly: cfexchangeconnection action=open username=myUser password=myPass mailboxname=myActiveDirectoryMailboxName server = ukexmbmanv01.uk.hllp.local connection = conn1 Note that 'myActiveDirectoryMailboxName' is not the same as my username (what I would type in the login box if I logged into a windows machine). -- Tom Chiverton Helping to heterogeneously integrate turn-key platforms 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 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. 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 Solicitors Regulation Authority. 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 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300050 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
trouble with cfExchange
I'm really struggling to get into MSEX on Win server 2003 SBS SP1 I can get into OWA by HTTP in a browser either in my user account, or the account CF8 is running in. IIS Web service extensions are enabled - I started off with just the ones suggested in the instructions, then I activated all of them. cfexchangeConnection action = open username = *** password = ** server = 192.168.0.3/exchange connection = conn1 protocol = http HTTP/1.1 500 Cannot access Exchange server as a web application at 192.168.0.3/exchange It's the same with server=t8s/exchange either works in a browser. Going to 192.168.0.3 or t8s in a browser takes me to the SBS home page, but I've tried these in cfexchangeConnection server= just in case, but the same result. If I insert formBasedAuthentication=yes then I get a different response: HTTP/1.1 500 Access to the Exchange server denied. But this isn't activated on the MSEX server and I understand it needs SSL anyway; for the time being I would like to keep SSL / HTTPS out of it to reduce complication. I'm almost certain it must be something to do with a setting SBS makes in MSEX, I've looked around quite extensively but I can't really claim great expertise in the thing it just works (in Outlook Etc) Any ideas? I'm completely stuck... Thanks Richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299890 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: trouble with cfExchange
Tom Yes, I tried that (if you look further down my original mail) but on the basis that I can only get at my exchange in a browser at http://192.168.0.3/exchange or http://t8s/exchange and http://192.168.0.3 or http://t8s takes me to the SBS home page, should I change dns/iis so 192.168.0.3 goes directly to OWA, or does cfExchange deal with the /exchange bit automatically? (on other systems I've seen, owa is usually at server/exchange) Perhaps I'm missing the point... thanks Richard -Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: 26 February 2008 16:13 To: CF-Talk Subject: Re: trouble with cfExchange On Tuesday 26 Feb 2008, Richard Meredith-Hardy wrote: cfexchangeConnection action = open username = *** password = ** server = 192.168.0.3/exchange connection = conn1 protocol = http Server here should be just the host name or IP address. -- Tom Chiverton Helping to globally bully corporate methodologies 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 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. 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 Solicitors Regulation Authority. 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 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299897 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Searching for keywords from an entered list...
I do this in a 2 stage thing as part of an AJAX lookup this is the CF code, #SUGGEST_LOOKUP_STR# is the input string OUTLOOKNAME is a field in the DB made of firstName Surname, CompanyName (or variations thereof) like in Outlook. Result if you type in t returns all items with any word starting in t type in t f returns all items which have words starting in t and f type in tr f returns all items which have words starting in tr and f Etc. CFLOOP LIST=#trim(replace(SUGGEST_LOOKUP_STR,','',all))# DELIMITERS= INDEX=idx CFSET qstr = listappend(qstr,(dbo.UDF_MAKESEARCHSTRING(OUTLOOKNAME) like '%|#idx#%'),¬) /CFLOOP CFSET qstr = replace(qstr,¬, AND ,all) CFQUERY NAME=getlist DATASOURCE=#ds1# SELECT USERREF AS RETURNID, OUTLOOKNAME AS DIVDATA FROM ALLCONTACTS WHERE ISCUSTOMER = 1 AND #preservesinglequotes(qstr)# ORDER BY OUTLOOKNAME /CFQUERY --- and the UDF in MSSQL is: --- USE [MY_DB] GO /** Object: UserDefinedFunction [dbo].[UDF_MAKESEARCHSTRING] **/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE FUNCTION [dbo].[UDF_MAKESEARCHSTRING] (@mystring varchar(700)) RETURNS varchar(700) AS BEGIN -- strip out ( and ) and , from search string SELECT @mystring = replace(@mystring,'(','') SELECT @mystring = replace(@mystring,')','') SELECT @mystring = replace(@mystring,',','') SELECT @mystring = replace(ltrim(rtrim(@mystring)),' ','|') if len(@mystring) 1 begin SELECT @mystring = '|' + @mystring end RETURN @mystring END --- HTH Richard -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 26 February 2008 16:34 To: CF-Talk Subject: Searching for keywords from an entered list... I'm wanting to modify a site search (field in SQL Server database) so that in a single input field, a user could enter: 1. red 2. red, blue, green, brown 3. red green blue brown and in return, get all results that contained one/some/all of the entered terms. In theory, what would be the best way to go about this? There was a previous thread on this, but so far, I've been unable to find it. Anybody got the URL of the original thread? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299900 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CF8 CSS woes
After years of CF5 I'm starting off on my first big CF8 project. While we really need it for it's new accessibility to Exchange, the wizzy new AJAX features are great and as far as I can see have the potential to take out the loads of fiddly JS I always seem to end up with in my AJAX calls Etc. At the same time however, these nice tags create loads of fiddly CSS if I'm to get the site looking like my client wants. So far, 1) I set up the basic page layout (based on a YUI fonts/grids layout) and a CFAjaximport-ed set of the CFIDE files. 2) Got CFMENU working to my liking, eventually. 3) Got CFLAYOUT tabs working, after some conflicts with YUI and menu CSS At this stage dynamic CFGRID visually is completely broken. arrrgh. Basically, the more components I add and then tweak their CSS, the more tricky and time consuming it's becoming to get everything to play together Has someone done any kind of generic CSS skin for a range of the more common new CF8 stuff? At least it might set me on a straighter track. Failing that: A) Am I approaching this in completely the wrong way, I should forget about tweaking the multifarious .css files CF8 needs and just stick with the limitations of what I can style in the CF tags themselves? OR B) Should I limit myself to only ADDING css elements to a cf8-mysite-mods.css file - at least this would keep all css mods in the same place, but not sure how wise or practical it is to effectively un-cascade the elements I need to; there's additional overhead for the browser as well. OR C) The way I'm doing it: tweaking the underlying 'default' css, is the only way to do it. What do you do? Thanks Richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298908 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Time to come out of the stone age
Dear all We've been merrily running quite a big intranet on CF 5.1 for years but it's time to take advantage of some of the new stuff in CF8. Obviously we will deploy on a nice new server, but will CF5 and CF8 run happily together with iis on our dev Win2k3 r2 server? How to set it up? I've seen http://cfdj.sys-con.com/read/42069.htm does this still apply? Or is there a more recent guide about that someone could point me at. Thanks for your help. Richard ~| 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:294300 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Time to come out of the stone age
Don Thanks for this. I will try an install and see what happens... Richard -Original Message- From: d l [mailto:[EMAIL PROTECTED] Sent: 06 December 2007 14:44 To: CF-Talk Subject: Re: Time to come out of the stone age Richard, A couple of notes may be of reference to you since I just installed cf8 standard trial edition on an XP box with an existing cf4.5 supporting a simple app and yes they now seem to live happily together using the same IIS 5 web server. a) be very careful about various firewall/anti-viruus software, disabling them does not necessarily mean some of their functions won't still reside in memory (hence the ghost is still there... I for one overlooked that) b) become comfortable with the fact that cf8 documentation is not bad when you look at it piece by piece, however, such several generations old documentation approach leaves much much room for agony c) jrun.xml, adminconfig.xml are your friends (I wish I had that knowledge before I got started this time, have not touched cf for quite some time...) d) the usual suspects of log files... e) last but not least, if things do not go as you reasonably expect do not curse, be unlike me :) for instance, you did not expect it to be a Hoculean project but it may very well turn out to be one. Good luck. Don Dear all We've been merrily running quite a big intranet on CF 5.1 for years but it's time to take advantage of some of the new stuff in CF8. Obviously we will deploy on a nice new server, but will CF5 and CF8 run happily together with iis on our dev Win2k3 r2 server? How to set it up? I've seen http://cfdj.sys-con.com/read/42069.htm does this still apply? Or is there a more recent guide about that someone could point me at. Thanks for your help. Richard ~| 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:294322 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Time to come out of the stone age
Dave Excellent. Thankyou very much for this. I think I'd prefer to use iis rather than the built-in one if I can and then it will be 'nearer' to the eventual production environment thus less possibility of nasty last-minute surprises. Regards Richard -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: 06 December 2007 16:53 To: CF-Talk Subject: RE: Time to come out of the stone age Obviously we will deploy on a nice new server, but will CF5 and CF8 run happily together with iis on our dev Win2k3 r2 server? Yes, although by default CF5 will monopolize your web server's configuration, so that all requests for .cfm files are sent to it. The below-mentioned article describes how to fix that. How to set it up? I've seen http://cfdj.sys-con.com/read/42069.htm does this still apply? Yes, it does. However, you can make the process a little simpler by configuring separate virtual web servers in IIS, manually configuring CF5 to use only one of them, and configuring CF8 to use the other. Alternatively, you could simply forego connecting CF8 to IIS at all, and just use the JRun web server for CF8. 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 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:294337 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cfstoredproc message
Not quite what I'm looking for, I think. This is actually a sp which contains a RESTORE DATABASE command and I'm interested to capture the stuff which goes into messages like: Processed 10240 pages for database 'xx', file 'xxx' on file 1. Processed 1 pages for database 'x', file 'xx_log' on file 1. RESTORE DATABASE successfully processed 10241 pages in 11.732 seconds (7.150 MB/sec). How do I capture that? -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 27 February 2007 07:45 To: CF-Talk Subject: Re: Cfstoredproc message Well if it is success or not then you just use the return codes. If you want a specific user defined message you will have to select it into a var and return it as an OUT or as a resultset. 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: Richard Meredith-Hardy To: CF-Talk Sent: Tue Feb 27 06:45:39 2007 Subject: Cfstoredproc message Simple question, I hope How does one get back to CF the message a stored proc normally puts in the messages window when you run it in SQL Server management studio or enterprise manager? Thanks in advance Richard (I've hunted around but difficult to search for the word 'message'...) ~| 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:270748 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cfstoredproc message
I suppose it's really a mssql question of trapping the generated message(s) and putting them in a var which can be returned to CF. How to do it though? -Original Message- From: Dinner [mailto:[EMAIL PROTECTED] Sent: 28 February 2007 00:38 To: CF-Talk Subject: Re: Cfstoredproc message If you use java DB stuff, I assume it would be available... Probably not from the built in CF DB stuff tho. :-/ On 2/27/07, Richard Meredith-Hardy [EMAIL PROTECTED] wrote: Not quite what I'm looking for, I think. This is actually a sp which contains a RESTORE DATABASE command and I'm interested to capture the stuff which goes into messages like: Processed 10240 pages for database 'xx', file 'xxx' on file 1. Processed 1 pages for database 'x', file 'xx_log' on file 1. RESTORE DATABASE successfully processed 10241 pages in 11.732 seconds (7.150 MB/sec). How do I capture that? ~| 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:270918 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Cfstoredproc message
Simple question, I hope How does one get back to CF the message a stored proc normally puts in the messages window when you run it in SQL Server management studio or enterprise manager? Thanks in advance Richard (I've hunted around but difficult to search for the word 'message'...) ~| 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:270739 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Trouble installing MX 7
Dear all I'm having a bit of trouble installing MX7 std trial on my dev win 2003 server R2 / iis 6 CF5 enterprise has been running fine on it for ages. I would like to retain CF5 along the lines of http://dfdj.sys-con.com/42069.htm so I renamed the CF5 CFIDE and CFDOCS before starting. Vanilla MX7 install except path is to c:\apps\CFusionMX rather than the default. MX702 seemed to install without complaint. - The ColdFusion MX 7 Application Server Service is running. - .cfm, .cfc Etc. files in IIS are pointing at ...irun_iis6.dll semingly correctly. But whatever I seem to do with file permissions and IIS I'm getting 401.3 unauthorized: Access is denied due to an ACL set on the requested resource. on localhost or any other URL so can't get into the administrator, or anything else on the entire server. The strange thing is, I don't think there are any ACL's set up on this server... It's just enable anonymous access under IUSR_servername, no IP address restrictions, Secure communications off. My eventual objective is to have it running in a domain account rather than the local system account like you do with CF 5, but to begin with, getting it to run any way would be good... I've cast around and can't really find any notes on this sort of thing, there must be loads out there really, initially just a guide to what all the default file permission settings and IIS setings should be would be great Thanks Richard (back on the list after several years) ~| 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:270165 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Trouble installing MX 7
Brilliant After a -lot- of messing around, the silent install finally worked. Thanks! I have to say that CF 4.5 and 5 always installed like a dream (for me). I heard a lot of tales of woe when MX 6 came out which rather put me off upgrading but I really would have thought it would have been fixed by now Richard -Original Message- From: Steve Good [mailto:[EMAIL PROTECTED] Sent: 20 February 2007 13:54 To: CF-Talk Subject: Re: Trouble installing MX 7 I had to do a silent install and turn off DEP to get MX 7 installed on my 2003 R2 machine. Here's a link on how to silent install: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=87bd20f4 To turn off DEP just right click My Computer and choose properties. The DEP settings are under the Advanced tab and the Performance button. Good luck! ~Steve Richard Meredith-Hardy wrote: Dear all I'm having a bit of trouble installing MX7 std trial on my dev win 2003 server R2 / iis 6 CF5 enterprise has been running fine on it for ages. I would like to retain CF5 along the lines of http://dfdj.sys-con.com/42069.htm so I renamed the CF5 CFIDE and CFDOCS before starting. Vanilla MX7 install except path is to c:\apps\CFusionMX rather than the default. MX702 seemed to install without complaint. - The ColdFusion MX 7 Application Server Service is running. - .cfm, .cfc Etc. files in IIS are pointing at ...irun_iis6.dll semingly correctly. But whatever I seem to do with file permissions and IIS I'm getting 401.3 unauthorized: Access is denied due to an ACL set on the requested resource. on localhost or any other URL so can't get into the administrator, or anything else on the entire server. The strange thing is, I don't think there are any ACL's set up on this server... It's just enable anonymous access under IUSR_servername, no IP address restrictions, Secure communications off. My eventual objective is to have it running in a domain account rather than the local system account like you do with CF 5, but to begin with, getting it to run any way would be good... I've cast around and can't really find any notes on this sort of thing, there must be loads out there really, initially just a guide to what all the default file permission settings and IIS setings should be would be great Thanks Richard (back on the list after several years) ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270191 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Server side printing
Can anyone suggest how an Intranet user can send a PDF or text file to be printed on a specific printer from the server side? I'm thinking specifically about printing labels on a Dymo Labelwriter 330 USB which is on a box on the network. This is with CF5 / Win2K3 Thanks -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193053 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
binary question
ldp returns an object's objectSid as S-1-5-21-85748401-1263151954-712603620-2180 wheras CFLDAP returns it as something like Ò'[EMAIL PROTECTED] anyone know how to decode this? ToString() doesn't. (I assume objectSid is an Active Directory entry's UUID?) This is on CF 5.1 Thanks -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187863 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: binary question
Thanks. I can't make sense of why it should appear in one view like this and from CFLDAP as another. Instead I have resolved my problem using a slightly different approach. Tangorre, Michael wrote: From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] ldp returns an object's objectSid as S-1-5-21-85748401-1263151954-712603620-2180 wheras CFLDAP returns it as something like Ò'.6d'ÁJ[EMAIL PROTECTED] anyone know how to decode this? ToString() doesn't. (I assume objectSid is an Active Directory entry's UUID?) This is on CF 5.1 The object ID that is being returned always looks like S-1-5-21-85748401-1263151954-712603620-2180 (format wise)... The string Ò'.6d'ÁJ[EMAIL PROTECTED] looks like the hashed password that is stored for the object (most likely a domain account password). If in fact it is the password field and it needs to be changed I believe you have to do that through AD. Mike ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187972 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
LDAP woes
I'm trying to get the Exchange 2003 global address book, the DN below works perfectly in ldp but whatever I do I can't get SCOPE=ONELEVEL to work in CFPLDAP, the other two scope options work, but don't produce what I want (so I know I've a connection Etc). This is on CF5 / win2K3 The error is 'CFLDAP local error' - not much help. CFLDAP ACTION=QUERY NAME=getmail SERVER=*.*.*.* USERNAME=* PASSWORD=* START=CN=Default Global Address List ; CN=All Global Address Lists ; CN=Address Lists Container ; CN=xxx Group ; CN=Microsoft Exchange ; CN=Services ; CN=Configuration ; DC= ; DC=com SCOPE=oneLevel ATTRIBUTES=displayName,givenName,sn,description,department,company,streetAddress,postalCode,telephoneNumber,Mail,mAPIRecipient,msExchHideFromAddressLists Can anyone help? I'm more or less a complete LDAP beginner Thanks -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187775 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
CFCOMET - Exchange server
What ever happened to CFCOMET? I would like to get at Exchange server public address books from CF5 but have no idea where to even start... -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183834 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFCOMET - Exchange server
Hum ho - thanks. Michael Dinowitz wrote: Dain was going to take it back and set it up on a new server (I was running it for him). I need access to the network solutions settings to get it back up. I'll try to contact him again. What ever happened to CFCOMET? I would like to get at Exchange server public address books from CF5 but have no idea where to even start... ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183872 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFCOMET - Exchange server
Brilliant! Thanks. Not much stuff on exchange but v helpful on COM stuff which should get me going. Michael Dinowitz wrote: It's now up and running on http://cfregex.com/cfcomet/ If you have the site on your server couldn't you set up something like http://cfcomet.houseoffusion.com? ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183900 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: what is it called..?
.not the least of which being that it becomes very difficult to do anything with the value within a query in a relational database where I would be storing the value of option. So instead I generally store individual columns of type integer or number(1,0). I think you can... using bitwise concantenation '' - but I am way out of my depth here theoretically - seems to work empirically though! Seriously - if anyone has any light to spread on my actual understanding of this I should greatly appreciate it... My table: row | superstatus | switch_list (for reference) 1 | 1023| 0,1,2,3,4,5,6,7,8,9 2 | 959 | 0,1,2,3,4,5,7,8,9 3 | 1019| 0,1,3,4,5,6,7,8,9 4 | 0 | in MSSQL the queries: SELECT * FROM MyTable WHERE superstatus power(2,6) 0 -- returns rows 1 3 ie switch 6 is present SELECT * FROM MyTable WHERE superstatus power(2,6) = 0 -- returns rows 2 4, ie switch 6 is not present SELECT * FROM MyTable WHERE superstatus power(2,6) 0 AND superstatus power(2,2) 0 -- returns row 1 ie switches 6 2 are present ... Etc. I've integrated this into a MSSQL UDF to make it a bit simpler to use; dbo.udf_IsSwitch(superstatus,6) S. Isaac Dealey wrote: ...when you have a value eg 22 which is made up of 2+4+16 so you know of all your options valued 2,4,8,16,32 Etc only 2 and 4 and 16 apply. I know there must be a mathematical name for this, but what? Does anyone have some example CF code to 'decrypt' such numbers? Are there other [simple] ways to do this to handle a large number of options (25, so I don't start having giant numbers?) Something to do with prime numbers perhaps? You can tell I'm not a mathmatician can't you! THANKS! If you really want something like this (I generally don't), I would look into using bitmaskread and bitmaskset... Start with 0 ... this gives you an integer which will have (iirc) 32 registers for placing a bit... so you can turn any individual bit on or off like so: cfset options = 0 !-- turn on the option in the first bit --- cfset options = bitMaskSet(options,1,0) Then to read that option: cfset option1 = bitMaskRead(options,0) ... the bitmask functions allow you to manipulate more than one bit at a time, but this is probably the easiest way to handle it. I generally avoid using these for a host of reasons, not the least of which being that it becomes very difficult to do anything with the value within a query in a relational database where I would be storing the value of option. So instead I generally store individual columns of type integer or number(1,0). p.s. I recognize the pattern you were asking for (which is different than this bitmask solution)... in grade school I remember having to use those values to assign display properties in GW Basic, among other things. At the time they were dealing with extremely limited hardware (physical ram). Imo nowadays it's always more trouble than it's worth. s. isaac dealey 954.927.5117 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.sys-con.com/story/?storyid=44477DE=1 http://www.sys-con.com/story/?storyid=45569DE=1 http://www.fusiontap.com ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=35 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182305 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
what is it called..?
...when you have a value eg 22 which is made up of 2+4+16 so you know of all your options valued 2,4,8,16,32 Etc only 2 and 4 and 16 apply. I know there must be a mathematical name for this, but what? Does anyone have some example CF code to 'decrypt' such numbers? Are there other [simple] ways to do this to handle a large number of options (25, so I don't start having giant numbers?) Something to do with prime numbers perhaps? You can tell I'm not a mathmatician can't you! THANKS! -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182191 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: what is it called..?
No relation, I'm afraid! Say I have a DB record with lots of attributes. Rather than have loads of bit columns which each have to be individually evaluated yes/no, I think you can achieve the same thing by having the single value 22 which can be evaluated later to mean 2=yes, 4=yes, 8=no, 16=yes, 32=no Etc. Douglas Knudsen wrote: but you inherit a geat name in mathematics! Hardy! http://www.stetson.edu/~efriedma/periodictable/html/Ho.html So, what are you trying to do? looks like some sort of partitioning looking only at powers of 2.. Can you give another example? Doug On Thu, 21 Oct 2004 16:25:57 +0100, Richard Meredith-Hardy [EMAIL PROTECTED] wrote: ...when you have a value eg 22 which is made up of 2+4+16 so you know of all your options valued 2,4,8,16,32 Etc only 2 and 4 and 16 apply. I know there must be a mathematical name for this, but what? Does anyone have some example CF code to 'decrypt' such numbers? Are there other [simple] ways to do this to handle a large number of options (25, so I don't start having giant numbers?) Something to do with prime numbers perhaps? You can tell I'm not a mathmatician can't you! THANKS! -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=36 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182201 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: what is it called..? partially solved
OK, thanks very much, I think I have a solution, though I still don't know what this is called, or really what the bitand() function is doing (any pointers to a -simple- explanation of the bitxx functions?) Consider the following code. It seems to work: CFSET mylistOfOn = !--- create a list of 'on switches' of a random length between 1 30 --- CFSET len = randrange(1,30) CFLOOP CONDITION=listlen(mylistOfOn) lte len CFSET xnum = randrange(0,30) CFIF listfind(mylistOfOn,xnum) eq false CFSET mylistOfOn = listappend(mylistOfOn,xnum) /CFIF /CFLOOP !--- generate the number --- CFSET num = 0 CFLOOP LIST=#mylistOfOn# INDEX=idx CFSET num = num + (2^idx) /CFLOOP CFOUTPUTList of 'on switches': #mylistOfOn#BR Transposed to the single number: #num#/CFOUTPUTBR !--- test which switch is on --- BRnbsp;BR Test the numberBR CFLOOP FROM=0 TO=30 INDEX=idx CFSET z = 2^idx CFOUTPUT #idx#: CFIF bitand(z,num) gt 0yesCFELSEno/CFIF [#z#]BR /CFOUTPUT /CFLOOP Richard Meredith-Hardy wrote: ...when you have a value eg 22 which is made up of 2+4+16 so you know of all your options valued 2,4,8,16,32 Etc only 2 and 4 and 16 apply. I know there must be a mathematical name for this, but what? Does anyone have some example CF code to 'decrypt' such numbers? Are there other [simple] ways to do this to handle a large number of options (25, so I don't start having giant numbers?) Something to do with prime numbers perhaps? You can tell I'm not a mathmatician can't you! THANKS! -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182235 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: exchange server
Mail back on after 16 hours... As it happens I found that Forta's book covers ES for all it's LDAP examples so I am much clearer about what I am trying to achieve now. Thanks everyone! James Holmes wrote: I agree here - Exchange 2003 uses AD info as its GAL, so the best way to get the info is to use CFLDAP to query AD. -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Friday, 8 October 2004 2:00 To: CF-Talk Subject: RE: exchange server This address book of which you speak...Is it in a single mailbox or is it a distribution group? Can you not worry about the Exchange part and just use the information in the Active Directory? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
exchange server
Can anyone point me at any resources on how I can get at a common address book in Exchange server 2003 from CF? CFCOMET seems to have disappeared... Thanks. -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: exchange server
To be quite honest, I've no idea how Exchange server works, or what the GAL is. That's why I was looking for 'resources' rather than a specific answer - I don't really know the question! I don't have exchange server on my dev system so can't actually try anything here - it's more of a research into the possibility. James Holmes wrote: Is there an LDAP interface to the GAL? This is how we do it. -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, 7 October 2004 10:34 To: CF-Talk Subject: exchange server Can anyone point me at any resources on how I can get at a common address book in Exchange server 2003 from CF? CFCOMET seems to have disappeared... [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
running MSSQL scripts
I'm struggling here What I would like to do is load a MSSQL script created in Query Analyser or Enterprise manager onto the server and then run it from CF5. making and loading the .sql file is easy.Running it is another matter. I've tried creating a sp which runs xp_cmdshell @stwhere @st is a complete osql string.This works but being a 2 stage process it seems to be difficult to get any meaningful feedback if there is a problem in the script. sp_executesql seems to be a better option but how to read the .sql file? This must be a common thing people need to do? -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: running MSSQL scripts
Why? This is for DB maintenance tasks.If you make an alteration to a table, moving a field position for example, then Enterprise Manager can sometimes make quite a long script with transactions, temporary tables and lots of GO statements. Yes, I suppose I could split it up into lots of separate CFQUERYs, surrounding the lot with CFTRANSACTION, but it seems easier to me and much less error prone to just be able to run the script itself. Robertson-Ravo, Neil (RX) wrote: What does the script do?You should be able to just use cfquery unless it's using some non-supported SQL. _ From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 01 October 2004 13:00 To: CF-Talk Subject: running MSSQL scripts I'm struggling here What I would like to do is load a MSSQL script created in Query Analyser or Enterprise manager onto the server and then run it from CF5. making and loading the .sql file is easy.Running it is another matter. I've tried creating a sp which runs xp_cmdshell @stwhere @st is a complete osql string.This works but being a 2 stage process it seems to be difficult to get any meaningful feedback if there is a problem in the script. sp_executesql seems to be a better option but how to read the .sql file? This must be a common thing people need to do? -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: running MSSQL scripts
From CF5, I said, it says, [below] Michael Traher wrote: You do not mention CF, but since you are posting to CF-TALK I assume it comes into the process somewhere :-) If you frame your question around how it fits into CF this list will be able to help you right away! Apart from CFQUERY making your script a stored dbproc may be an option - this can then be called from CF with CFSTOREDPROC. Best Regards Mike - Original Message - From: Richard Meredith-Hardy [EMAIL PROTECTED] Date: Fri, 01 Oct 2004 12:59:30 +0100 Subject: running MSSQL scripts To: CF-Talk [EMAIL PROTECTED] I'm struggling here What I would like to do is load a MSSQL script created in Query Analyser or Enterprise manager onto the server and then run it from CF5. making and loading the .sql file is easy.Running it is another matter. I've tried creating a sp which runs xp_cmdshell @stwhere @st is a complete osql string.This works but being a 2 stage process it seems to be difficult to get any meaningful feedback if there is a problem in the script. sp_executesql seems to be a better option but how to read the .sql file? This must be a common thing people need to do? -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: running MSSQL scripts
This is a dev intranet setup at a remote location, I probably won't have direct access to the DB with EM. CFQUERY doesn't like EM script at all. ODBC, I imagine. A sp is exactly what I am trying to do. However, if you pass the actual script in as a var from CF5 then you run into unicode and/or ntext problems (I think) which is why it occurred to me just pass it a script path name, sp gets the actual text from the file and then runs it.How to do it though. EM may be but it seems to work, and the scripts seem to be repeatable in EM or query analyser, and it's easy to generate them. What's the alternative? Robertson-Ravo, Neil (RX) wrote: Don't you have access to the SQL Server? If so use an SP.NOTE: GO is not a required statement.Also, don't get EM to script, it's crapola. _ From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 01 October 2004 14:41 To: CF-Talk Subject: Re: running MSSQL scripts Why? This is for DB maintenance tasks.If you make an alteration to a table, moving a field position for example, then Enterprise Manager can sometimes make quite a long script with transactions, temporary tables and lots of GO statements. Yes, I suppose I could split it up into lots of separate CFQUERYs, surrounding the lot with CFTRANSACTION, but it seems easier to me and much less error prone to just be able to run the script itself. Robertson-Ravo, Neil (RX) wrote: What does the script do?You should be able to just use cfquery unless it's using some non-supported SQL. _ From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: 01 October 2004 13:00 To: CF-Talk Subject: running MSSQL scripts I'm struggling here What I would like to do is load a MSSQL script created in Query Analyser or Enterprise manager onto the server and then run it from CF5. making and loading the .sql file is easy.Running it is another matter. I've tried creating a sp which runs xp_cmdshell @stwhere @st is a complete osql string.This works but being a 2 stage process it seems to be difficult to get any meaningful feedback if there is a problem in the script. sp_executesql seems to be a better option but how to read the .sql file? This must be a common thing people need to do? -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
iif in MSSQL
dear all is there a way of doing the following in a query to MSSQL like you can to access? SELECT field1, field2, iif(field1 = field2,'same','different') AS mynote FROM mytable WHERE etc I appreciate it could be done in a SP or by analysing the output but in this case it is easier not to... thanks -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: iif in MSSQL
Perfect.Thankyou! -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
time conumdrum
Dear all In converting over a timesheets application from Access to MSSQL I am having difficulty with datetime fields:consider the following (in CF5): CFSET t1 = createtime(00,00,00) output: {ts '1899-12-30 00:00:00'} CFSET t2 = createtime(12,00,00) output: {ts '1899-12-30 12:00:00'} CFSET t3 = createtime(00,30,00) output: {ts '1899-12-30 00:30:00'} CFSET t4 = t1 + t2 output: 0.5 CFSET t4a = t2 + t3 output: 0.5208 CFSET t4b = createodbctime(t2 + t3) output: {t '12:30:00'} CFSET t4c = createodbcdatetime(t2 + t3) output: {ts '1899-12-30 12:30:00'} The values above are all saved to a MSSQL DB in datetime fields, this is the output: t1: 1899-12-30 00:00:00 t2: 1899-12-30 12:00:00 t3: 1899-12-30 00:30:00 t4: 1900-01-01 12:00:00 t4a: 1900-01-01 12:29:59 t4b: 2004-09-19 12:30:00 t4c: 1899-12-30 12:30:00 As you can see, there are various inconsistencies here which will make further calculations dangerous and/or tricky (summaries etc) and also might produce different results if / when we upgrade CF. In fact all I am interested in are the hh:mm, I was wondering what other people do when recording and calculating time... Thanks -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: time conumdrum
Michael I'm not recording start time - stoptime, it's not what the client wants, just 'time spent' on a job, entered on a daily basis. The nature of the business is such that each employee often does a bit of work on half a dozen different jobs each day. Ultimately they are interested in: a) Total time spent on a job which can then be analysed in various ways eg who worked on it (and how much), by job code (ie analysis by type of work on the job) Etc. b) Total time an employee has worked on jobs (or been training, off sick, on holiday etc) each week. Dawson, Michael wrote: I've never really had a use for time that didn't also use date as well. In your case, what would happen if an employee's shift overlapped midnight?For example, the person starts at 9:00 pm and quits at 5:00 am.If you disregard the date, wouldn't you end up with a negative time? If this doesn't matter, I would just use a numeric field and store the number of seconds since midnight for both the start and end of the shift.That way, simple math would give you the number of seconds of actual work time. M!ke From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 8:30 AM To: CF-Talk Subject: time conumdrum Dear all In converting over a timesheets application from Access to MSSQL I am having difficulty with datetime fields:consider the following (in CF5): CFSET t1 = createtime(00,00,00) output: {ts '1899-12-30 00:00:00'} CFSET t2 = createtime(12,00,00) output: {ts '1899-12-30 12:00:00'} CFSET t3 = createtime(00,30,00) output: {ts '1899-12-30 00:30:00'} CFSET t4 = t1 + t2 output: 0.5 CFSET t4a = t2 + t3 output: 0.5208 CFSET t4b = createodbctime(t2 + t3) output: {t '12:30:00'} CFSET t4c = createodbcdatetime(t2 + t3) output: {ts '1899-12-30 12:30:00'} The values above are all saved to a MSSQL DB in datetime fields, this is the output: t1: 1899-12-30 00:00:00 t2: 1899-12-30 12:00:00 t3: 1899-12-30 00:30:00 t4: 1900-01-01 12:00:00 t4a: 1900-01-01 12:29:59 t4b: 2004-09-19 12:30:00 t4c: 1899-12-30 12:30:00 As you can see, there are various inconsistencies here which will make further calculations dangerous and/or tricky (summaries etc) and also might produce different results if / when we upgrade CF. In fact all I am interested in are the hh:mm, I was wondering what other people do when recording and calculating time... Thanks -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: time conumdrum
Jochem Thankyou.I was rather thinking I might have to convert everything to sec (I have no choice in this case but to use MS SQL) but as this is going to be a bit of a job it's nice to know it is a sensible thing to do. Jochem van Dieten wrote: Richard Meredith-Hardy wrote: In converting over a timesheets application from Access to MSSQL I am having difficulty with datetime fields:consider the following (in CF5): CFSET t1 = createtime(00,00,00) output: {ts '1899-12-30 00:00:00'} CFSET t2 = createtime(12,00,00) output: {ts '1899-12-30 12:00:00'} CFSET t3 = createtime(00,30,00) output: {ts '1899-12-30 00:30:00'} CFSET t4 = t1 + t2 output: 0.5 CFSET t4a = t2 + t3 output: 0.5208 CFSET t4b = createodbctime(t2 + t3) output: {t '12:30:00'} CFSET t4c = createodbcdatetime(t2 + t3) output: {ts '1899-12-30 12:30:00'} The values above are all saved to a MSSQL DB in datetime fields, this is the output: t1: 1899-12-30 00:00:00 t2: 1899-12-30 12:00:00 t3: 1899-12-30 00:30:00 t4: 1900-01-01 12:00:00 t4a: 1900-01-01 12:29:59 t4b: 2004-09-19 12:30:00 t4c: 1899-12-30 12:30:00 As you can see, there are various inconsistencies here I see only one inconsistency. Obviously t1, t2, t3 and t4c behave by the book (CF has a base date of 1899-12-30). With t4 and t4a you are first doing an addition and then doing inserting an integer in a datetime field. When you are inserting an integer in a datetime field the MS SQL server uses its own base date of 1900-01-01. With t4b you are not inserting an integer, but a time, and suddenly MS SQL Server uses the current date as the base date, instead of 1900-01-01 which is the documented base date. This might be an ODBC thing, but I suspect it is a MS SQL Server thing. In fact all I am interested in are the hh:mm, I was wondering what other people do when recording and calculating time... If I need to work with times, I don't use MS SQL Server but a database that has a TIME and an INTERVAL datatype. In your case I think it is best to convert your intervals (they are not times) to a number of seconds and store them in an integer field. That should be reasonable safe, but keep an open eye for DST issues. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Whole day comparison
hmm I had thought of this, it just is awfully verbose I've quite a lot of these date comparison queries to convert, I wonder if there's another way which avoids the complication of the H:M:S at all? One way, I suppose, would be to have a new longint column populated by a trigger on the date column, using a straight number series of days from some arbritrary origin (1/1/2000 would always produce positive numbers in my app).Seems a bit of an overkill though. This must be a common enough problem?What do other people do? Jochem van Dieten wrote: Richard Meredith-Hardy wrote: In access one way of comparing whole days in a DateTime field is with DateValue() thus: SELECT X,Y,Z WHERE datevalue(UPDATED) = #createOdbcDate(mydate)# unfortunately the dateValue() function doesn't exist in MS SQL so another way to do it is: SELECT X,Y,Z WHERE datediff(d,UPDATED,#createOdbcDate(mydate)#) = 0 My question:Is this an effecient way of doing it, or is there a better way? No. It is very unlikely that any database will be able to use an index for that query (look at the query plan to know for sure). From the perspective of performance it is probably better to use: SELECT X,Y,Z WHERE UPDATED BETWEEN cfqueryparam cfsqltype=cf_sql_date value=#mydate# AND cfqueryparam cfsqltype=cf_sql_date value=#DateAdd('d', 1, mydate)# Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Whole day comparison
Jochem Thanks for this, it does seem tricky. As a fix I have created a DATE_SERIAL field in the appropriate tables which is an integer based on datediff(d,'1 Jan 2000',mydate) maintained by a trigger on the actual datetime field (which will rarely alter). Indexes easily enough and seems the simplest way to go in queries. Jochem van Dieten wrote: Richard Meredith-Hardy wrote: I had thought of this, it just is awfully verbose I've quite a lot of these date comparison queries to convert, I wonder if there's another way which avoids the complication of the H:M:S at all? The usual solution is to use CAST(updated TO DATE) to cast the datetime field to a date field on the fly. Then you can use a simple equality operator (and the result of the cast is indexable for most databases). But date/time handling is not exactly where MS SQL Server excels: there is no date datatype to cast to. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
CF5 vanilla install checklist
Does someone out there have a configuration checklist for a vanilla install of the following please? Win 2003 server CF5 MS SQL server IIS It is the recommended permissions setup I am most interested in. Thanks. -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CF5 vanilla install checklist
Hmm. It says Please note: Macromedia ClusterCats and the ColdFusion Application Management components are not supported on this platform. What do you suppose ColdFusion Application Management components are? Is this things like the built in way client vars are handled by CFAPPLICATION ? John Beynon wrote: not security related but there is this technote, http://www.macromedia.com/support/coldfusion/ts/documents/install_cf_win2003.htm for getting cf5 to work on win2003. It's not as simple as a normal install jb. On Thu, 16 Sep 2004 08:31:37 +0100, Richard Meredith-Hardy [EMAIL PROTECTED] wrote: Does someone out there have a configuration checklist for a vanilla install of the following please? Win 2003 server CF5 MS SQL server IIS It is the recommended permissions setup I am most interested in. Thanks. -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CF5 vanilla install checklist
Dave Pls see below Dave Watts wrote: Does someone out there have a configuration checklist for a vanilla install of the following please? Win 2003 server CF5 MS SQL server IIS It is the recommended permissions setup I am most interested in. I don't think that Macromedia provides a recommended configuration for permissions, but what I like to do, personally, is to run CF as a specific low-privileged user, grant that user account change permissions to the CF install directory and read permissions to the web root (or anywhere else you have .cfm files). This is quite easy with CFMX, but less easy with CF 5, as you may have to change registry permissions and a few other odds and ends. Is that written down somewhere you know of (for CF5)? There's nothing really specific about Windows Server 2003 with regard to this, as opposed to Windows 2000. As for MS SQL Server, there's plenty of documentation out there on how to set that up, but I'd recommend that you limit your SQL Server network protocols to TCP/IP and disable other network protocols such as Named Pipes. OK You'll probably also want to use untrusted connections; if you use trusted connections, you'll have to run the CF service as the trusted user, so you'd have to use the same credentials for all the CF applications on that server. OK Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Whole day comparison
In access one way of comparing whole days in a DateTime field is with DateValue() thus: SELECT X,Y,Z WHERE datevalue(UPDATED) = #createOdbcDate(mydate)# unfortunately the dateValue() function doesn't exist in MS SQL so another way to do it is: SELECT X,Y,Z WHERE datediff(d,UPDATED,#createOdbcDate(mydate)#) = 0 My question:Is this an effecient way of doing it, or is there a better way? psI have a lot of quite big ones to do, like SELECT X,Y,Z WHERE datediff(d,UPDATED,#createOdbcDate(mydate)#) = 0 -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CF5 vanilla install checklist
Thanks! Shall try it. Dave Watts wrote: Is that written down somewhere you know of (for CF5)? This was written for CF 4, but I think it'll work for CF 5 as well: http://www.defusion.com/articles/index.cfm?ArticleID=89 Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Calendar/Gant chart solution
Ron Take a look at CFX_ISOCalendar highly flexible for this sort of thing.Written by Jukka Manner - him of CFX_IMAGE fame. Make sure you get a fairly recent version, (no more than a year or so old - I can supply the version) as there was a bug I found in earlier versions. Ron Eis wrote: We want to display a calendar of events in gant chart format.The calendar would span the year (or quarter, depending on available space) and display the date of each Monday.We want to be able to input a list of separate tasks throughout the year and assign start and end dates. When the list of calendar events is displayed, the user can click a specific task to see additional information that's associated with that task.Make sense?Any solutions or easy-to-tweak code anyone might have will be appreciated. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: gobbledegook returned from MySQL TEXT fields
Jochem I have sent this very same question to a couple of MySQL.com lists but without response so far.I was slightly hoping that someone might have come across this problem here seeing as it is CF5 which I am trying to get to work with it.I don't know whether it is a configuration issue or a bug or what. At the very least it would be nice to know which is the most recent version of MySQL / MyODBC which works correctly with CF5 on Win2k MySQL claim that a -gamma version is virtually 'production' 'only a matter of weeks from being the GA version' and it would be nice to be able to use 4.1 as it supports features like UNION statements subqueries which are both endemic to my app as it is written ( working) with Access at the moment. Somewhat in desperation I have started a separate thread on this list: 'Now I'm in a fix.Which DB?' Jochem van Dieten wrote: Richard Meredith-Hardy wrote: If I make a simple query on a VARCHAR(less than 255) column then the text is returned. If I do the same on a TEXT, MEDIUMTEXT or LONGTEXT field I get back something like 484954434F554E43D31234C4153 This is on Win2k Server SP4 / MySQL 4.1.4-gamma / MyODBC 3.51.090 The only way I can see the proper contents is in the field viewer in MySQL query browser, everything else returns the above; I am interested to get it to work in CF5. Wouldn't a MySQL list be better suited for questions about a beta product from MySQL? Especially if all clients except MySQL query browser have this problem (which suggests that actually MySQL query browser hase the problem). Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Now I'm in a fix. Which DB?
Dear all I should have asked this question before I got to this stage: Intranet; Win2k / CF5 Which DB should I use? Background: I've an intranet which has been working on Win2k / CF5 / Access just fine for the last couple of years.About 6 months ago I warned the big chiefs that the DB was beginning to get rather large and it was a good idea to consider moving to a proper DB for all the good reasons discussed here and elsewhere many times. M$ SQL server was the obvious choice but when they looked into it they got a big fright on the licensing costs; something around 15 - 20,000 GBP apparently.(some 200 clients use this intranet). I did a brief test of MySQL on my dev server - all too brief as it turns out -and it looked OK so Why not use MySQL? says I, commercial licence is 500 Euros, unlimited clients, and the new version supports all the 'advanced' features you need. Last week at a meeting with all the bigwigs it was agreed. So what happens?I've got a really intractible problem where text fields longer than 255 aren't being returned properly.Whether it's an ODBC problem, a DB problem or a simple configuration problem I don't know, I'm trying to find out, but at the moment my conversion has fallen over at the first hurdle as client vars in CDATA.DATA aren't being returned properly. This is MySQL 4.1I expect I could go to an earlier version, but this new version supports transactions, subqueries and UNION statements, and this intranet app is stuffed full of all of them.It would be a hell of a job to undo all that -- Regards; Richard Meredith-Hardy - r.mh[at]flymicro.com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Now I'm in a fix. Which DB?
OK... interesting.A couple of questions: I had a look and about the only significant limitation seems to be the 2Gb max size.Whilst I don't expect the current DB will be even a 100th of this I will have to give my clients some sort of idea of longevity. Is there any correlation between a compacted .mdb file size and when the same data is put in MSDE? I have ordinary SQL server enterprise edition running on my dev server for other apps I look after.Will MSDE run alongside it on the same box happily enough?For dev purposes can I get to either thru Enterprise manager? John Beynon wrote: don't forget you can use the normal SQL admin console to admin MSDE jb. On Mon, 13 Sep 2004 10:24:38 +0200, Dirk De Bock - Listclient [EMAIL PROTECTED] wrote: Get this one: http://www.microsoft.com/sql/msde/downloads/download.asp Basicly mssql without the licensing cost (and without some management tools) You can use access as the frontend with this one and upgrading your access db to sql is mostly painless - Original Message - From: Richard Meredith-Hardy To: CF-Talk Sent: Monday, September 13, 2004 10:16 AM Subject: Now I'm in a fix. Which DB? Dear all I should have asked this question before I got to this stage: Intranet; Win2k / CF5 Which DB should I use? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Now I'm in a fix. Which DB?
Paul the amount of concurrent users are also throttled. Max 25 it says.With 200 - 300 intranet users I don't think this would be an issue, would it? I haven't got any stats but it's not exactly as if they're hitting it all day long, its primary use is calendar timesheets (client is a publishing house and has half macs half PC's which is why they need it at all). Paul Hastings wrote: I had a look and about the only significant limitation seems to be the 2Gb max size.Whilst I don't expect the current DB will be even a 100th the amount of concurrent users are also throttled. of this I will have to give my clients some sort of idea of longevity. if the db grows bigger than swap to real sql server. same db will work w/it, just install new engine. Is there any correlation between a compacted .mdb file size and when the same data is put in MSDE? absolutely not. happily enough?For dev purposes can I get to either thru Enterprise manager? you can certainly use em w/msde though i'm not sure of licensing issues, though if you already own enterprise i guess it might not matter. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: gobbledegook returned from MySQL TEXT fields
Do you suppose this is a MyODBC issue or something deeper? CFMX uses the Java connect thingy doesn't it?Do you know if the same thing happens with that? Tim Blair wrote: This was where it started going wrong and needed casting to a char type instead of a date.So long as you don't group on the date field you should be ok. This seems to be an issue with MySQL - it also appears sometimes when you use the MySQL date functions.For some reason the query returns binary info instead of the usual text.You can just use toString(myQuery.binField) to get the proper value. Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media and ebusiness Gurus. WE'VE MOVED - for our new address, please visit our website at http://www.rawnet.com/ or call us any time on 0800 294 24 24. --- This message may contain information which is legally privileged and/or confidential.If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Now I'm in a fix. Which DB?
As I said earlier - I should have consulted this list first MSDE would probably do the job for the forseeable future, and that's for free (M$ 'free' ...? can't quite believe it...) with the option of a $4,600 upgrade if MSDE runs into problems.This probably wouldn't have been too difficult if it wasn't for the fact that in my ignorance I've already sung the praises of MySQL and pursuaded the big cheeses they can get the job done for 500 Euros under MySQL commercial licence. I have now got some info on workarounds for my problems with MySQL but when people tell you in that condition -sometimes- this happens it all seems a bit flaky - Somehow I feel I am shortly going to have to do some super-diplomatic back-paddling Adam Churvis wrote: M$ SQL server was the obvious choice but when they looked into it they got a big fright on the licensing costs; something around 15 - 20,000 GBP apparently.(some 200 clients use this intranet). You can pick up a 1 CPU license to the Standard Edition for under $4,600 from Buy.com. Respectfully, Adam Phillip Churvis Member of Team Macromedia Advanced Intensive Training: * C# ASP.NET for ColdFusion Developers * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 http://www.ColdFusionTraining.com Download CommerceBlocks V2.1 and LoRCAT from http://www.ProductivityEnhancement.com The ColdFusion MX Bible is in bookstores now! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
gobbledegook returned from MySQL TEXT fields
Dear all If I make a simple query on a VARCHAR(less than 255) column then the text is returned. If I do the same on a TEXT, MEDIUMTEXT or LONGTEXT field I get back something like 484954434F554E43D31234C4153 This is on Win2k Server SP4 / MySQL 4.1.4-gamma / MyODBC 3.51.090 The only way I can see the proper contents is in the field viewer in MySQL query browser, everything else returns the above; I am interested to get it to work in CF5. There must be a very simple solution to this isn't there?Thanks for helping me out. -- Regards; Richard Meredith-Hardy - r.mh[at]flymicro.com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
OT - Mac OS X roaming profile problem
Dear all I'm having a great deal of difficulty with a CF5 driven intranet which has worked just fine on PC's and Mac OS9 for two years now.They have introduced some OS X boxes using roaming profiles from an OS X server. It seems that cookie storage (MSIE and Safari) is kept in the profile (rather than the box itself) which in principle is a good thing - but -sometimes- it seems to be delivering up the wrong cookies (ie CFID CFTOKEN), specifically the pair belonging to the previous person to log in to the Server.It seems to all work fine if roaming profiles are disabled, but we are talking about several dozen boxes here and my client would rather not do this for other administrative reasons. As you can imagine, this is a bit of a problem as people are logging in to the Intranet as themselves but being shown as logged in as someone else (with all their site permissions Etc.).If they immediately log out and log in again then they usually are themselves as they have now been given the 'previous person's' cookies which are actually theirs. Some sort of CFLOCATION logout / login-again kludge might alleviate the problem but I don't think would be a true fix as it would all depend on the timing of when people logged in... As far as I can see, this is not a CF problem, rather, an OSX server / roaming profile problem.As a non-mac person myself, does anyone have any suggestions and/or know of any good forums where I might find an answer or a fix? -- Regards; Richard Meredith-Hardy - [EMAIL PROTECTED] Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: OT - Mac OS X roaming profile problem
Dave I'm not sure this would work because it is on 'the first hit' when the wrong CFID CFTOKEN are being issued, (or actually probably when the browser is opened), and there's no way of knowing what the right ones are.I don't believe my setup is unusual in that I have the variable client.loggedin, person A logs in correctly against a match in the DB and client.loggedin is set to true.Person B goes to the site shortly after on a different box and somehow gets given the same CFID CFTOKEN (I think by the roaming profile thing) so comes in directly as client.loggedin=true as person A. Unfortunately I can't test it here on my dev setup as I've only got one mac (which works perfectly - of course..), but I got all the OSX users to wipe their cookies on the live intranet so virgin CFID CFTOKEN's would be issued by CF, but it still happens. I haven't tried emptying the CDATA and CGLOBAL tables (they're not very big) but I suspect this wouldn't fix it either. Dave Watts wrote: I'm having a great deal of difficulty with a CF5 driven intranet which has worked just fine on PC's and Mac OS9 for two years now.They have introduced some OS X boxes using roaming profiles from an OS X server. It seems that cookie storage (MSIE and Safari) is kept in the profile (rather than the box itself) which in principle is a good thing - but -sometimes- it seems to be delivering up the wrong cookies (ie CFID CFTOKEN), specifically the pair belonging to the previous person to log in to the Server.It seems to all work fine if roaming profiles are disabled, but we are talking about several dozen boxes here and my client would rather not do this for other administrative reasons. ... As far as I can see, this is not a CF problem, rather, an OSX server / roaming profile problem.As a non-mac person myself, does anyone have any suggestions and/or know of any good forums where I might find an answer or a fix? I don't know anything about OS X roaming profiles, but from a CF perspective you should be able to fix the problem by using URL tokens instead of cookies, if you can't resolve the problem from the other end. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Safari and Client variables
Dear all We are getting some weird behaviour on an Intranet which has been working fine for 2 years.CF5 / WIN2K / IIS It uses a fairly standard client variable setup, they are stored in a DB.User logs in, is recognised, client variables are initialized Etc. thru the CFID / CFTOKEN cookies. It would seem that if 2 different users (A and B) on Mac OS 10 Safari or MSIE login one after the other on different boxes then user B will be recognized as user A.If A is on a PC or mac OS 9 then this doesn't occur, B is recognized as B. This is quite repeatable, anyone seen this / got a fix? Thanks -- Regards; Richard Meredith-Hardy - [EMAIL PROTECTED] Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: cf calendar
I can recommend Jukka Manner's CFX_ISOcalendar, very powerful flexible. (get the latest version though, there was a small but irritating bug in earlier versions where weekly calendars very occasionally failed). Tony Weeg wrote: hi there. looking for a cf based calendar, that can have sql server as its backend, and i can add events to it, and i can extend on it.money isnt an issue.features are where its at! suggestions anyone? thanks. tony tony weeg [EMAIL PROTECTED] www.revolutionwebdesign.com rEvOlUtIoN wEb DeSiGn 410.334.6331 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Eolas patent suit
... back to directly CF related, what is the workaround already put forward, I don't seem to be able to find it. We use dynamically generated PDF's a lot Bryan Stevenson wrote: Why would you not be able to use the workaround already put forward?I haven't paid a huge amount of attention as it doesn't effect any of my past of near future work. Thanks - Original Message - From: Jeff Beer To: CF-Talk Sent: Friday, October 24, 2003 9:03 AM Subject: Eolas patent suit I'm more than a little worried about this change.My livelihood comes from developing and delivering flash-based newsletters and promotions in e-mail.When this change goes into effect, we're either out of business or facing the loss of our primary product. I've seen no workarounds that will allow us to embed flash in an HTML e-mail message - scripting is out. This is a huge bummer. (Please don't start a dialogue about Flash in e-mail messages.It's not spam, and it's desired by our clients and the recipients. I just wanted to show that this patent issue definitely affects some of us in major ways.) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CFContent and PDF problems
Not sure what's wrong with a regular hyperlink to the PDF file if you want to push files to a client page? CFHEADER NAME=Content-Disposition VALUE=attachment; filename=#my_file_name# CFCONTENT TYPE = application/unknown FILE=#hard_path_to_file# DELETEFILE=no CFABORT ...works for us with PDF's and brings up the save as box. Shawn Grover wrote: We're using a CFContent to push files to a client page (after they've clicked on an appropriate link of course).Things are working for image files, but we are getting odd behaviour when we try to view PDF documents. Here's the code in question: !--- Set the name of the download file in the HTTP header --- CFHEADER NAME=Content-Disposition VALUE=filename=#oFTS.OriginalName# !--- Send the file (using the physical path to it) --- cfcontent type=#sMimeType# file=#sSourcePath# deletefile=no and the supporting variables are: Mime TYpe: application/pdf File Name: 2003100809073301noisereport.pdf Path and File: C:\inetpub\wwwroot\caa\ctreg_web\fts_files\2003100809073301noisereport.pdf What's happening is that the PDF file is getting dumped as raw text to the page, or we see a prompt to save our action page (getfile.cfm).However, this is a near exact copy of an existing routine from another application we did.In the other application, the PDF plug-in kicks in and we view the file in Adobe Acrobat.It would appear that in the process of copying and modifying the code, something minor was changed to result in this new behaviour.However, we've now had 3 people look at the code and we don't see anyting that should be causing this issue. Does anyone see anything wrong or have any suggestions?My thoughts are that we have missed something stupid... Thanks in advance. Shawn [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
intranet permissions?
On Win2k / CF5, rather than having everyone login to an Intranet site (in this case a new login is forced daily) how reliable is it to identify the user from cgi.AUTH_USER ? IIS is set: Anonymous access: No Basic Authentication: No Integrated Windows authentication: Yes Users are on MSIE on PC Mac cgi.AUTH_TYPE is NTLM What does the very long string belonging to cgi.HTTP_AUTHORIZATION mean? -- Regards; Richard Meredith-Hardy - [EMAIL PROTECTED] Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: intranet permissions?
OK, thanks What is a salt? Jochem van Dieten wrote: Richard Meredith-Hardy wrote: On Win2k / CF5, rather than having everyone login to an Intranet site (in this case a new login is forced daily) how reliable is it to identify the user from cgi.AUTH_USER ? IIS is set: Anonymous access: No Basic Authentication: No Integrated Windows authentication: Yes Users are on MSIE on PC Mac cgi.AUTH_TYPE is NTLM Very reliable. What does the very long string belonging to cgi.HTTP_AUTHORIZATION mean? That is a one-way hash of user identity + salt. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
copying from one datasource to another
I have 2 datasources, AccessLocal and WeirdRemote, this latter is some sort of bespoke DB on a Unix box down a leased line somewhere the other side of London, but I can get at it from CF via ODBC, and for that matter from Access (on the server) via ODBC. What I want to do is copy various tables on WeirdRemote into AccessLocal, basically to get a local copy of various tables on WeirdRemote, but not all records (so there has to be a query of some sort). Now I could do this by doing a query on WeirdRemote in CF and then looping over it with a load of Inserts into AccessLocal, but this would be rather complicated, and quite likely very slow. A better option seems to me to have a set of 'Make table queries' saved in my AccessLocal datasource and then I simply 'run' them from CF and the entire thing is then done in the background between WeirdRemote and AccessLocal, and in fact this can be done manually in Access, but because of WeirdRemote's licencing setup, only from the server. How to call the 'make table queries'? I don't seem to be able to do it via CFQUERY but I expect this can be done via COM into AccessLocal... anyone have an example code? -- Regards; Richard Meredith-Hardy - [EMAIL PROTECTED] Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 ~| [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: dates nightmare again!
To avoid this confusion I tend to always use a mmm month as in "25 Jul 2003", I expect someone will tell me otherwise, but I have never come across a date in this format which isdate() recognizes wrongly. Users don't get confused either. Claude Schneegans wrote: > > >>In CF4.5 > In CF 5, CFMX too. > > ~| [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: copying from one datasource to another
hmmm.. too simple! I will try it. Thanks. Kola Oyedeji wrote: > > > Richard > > You should be able to create linked tables in access containing all the > data then run a sql statement along the lines of. > > Create table myCopy as > ( > select ...from ... etc. > > ) > > HTH > Kola > > -----Original Message- > From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] > Sent: 23 September 2003 10:40 > To: CF-Talk > Subject: copying from one datasource to another > > I have 2 datasources, AccessLocal and WeirdRemote, this latter is some > sort of bespoke DB on a Unix box down a leased line somewhere the other > side of London, but I can get at it from CF via ODBC, and for that > matter from Access (on the server) via ODBC. > > What I want to do is copy various tables on WeirdRemote into > AccessLocal, basically to get a local copy of various tables on > WeirdRemote, but not all records (so there has to be a query of some > sort). > > Now I could do this by doing a query on WeirdRemote in CF and then > looping over it with a load of Inserts into AccessLocal, but this would > be rather complicated, and quite likely very slow. > > A better option seems to me to have a set of 'Make table queries' saved > in my AccessLocal datasource and then I simply 'run' them from CF and > the entire thing is then done in the background between WeirdRemote and > AccessLocal, and in fact this can be done manually in Access, but > because of WeirdRemote's licencing setup, only from the server. > > How to call the 'make table queries'? I don't seem to be able to do it > via CFQUERY but I expect this can be done via COM into AccessLocal... > anyone have an example code? > > > -- > Regards; > > Richard Meredith-Hardy > - > [EMAIL PROTECTED] > Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 > > ~| [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Quotes in dynamic queries [solved]
My mistake, however it wouldn't solve my particular problem because this particular app is recording a 'history' of changes {x changed from y to z). Yes, I know I could do this with triggers / stored procedures but in this case it would be awfully complicated, so instead I am evaluating the form returns and only updating fields which have changed [to acceptable values], and also writing to a history log. The entire thing is configured from a single structure of parameters so it is fairly simple to manage. To update only the fields with valid alterations I am building a query string on the fly fieldx = 'newvalue', fieldy = 'other new value', fieldz = new date etc. which is eventually put into the UPDATE query. Single quotes input by the user in text fields were causing problems because of their reserved use in SQL but not any other characters I can find. Jochem van Dieten wrote: Richard Meredith-Hardy wrote: CFQUERYPARAM only works after the WHERE, this is not the problem I have That is incorrect, you can use it anywhere. Second off, in a dynamic query like below, you need the preservesinglequotes() so the single quotes 'surrounding' the text value are not escaped automatically, however this will also preserve single quotes in the body of the text value which will cause an error. The fix is to escape any single quotes in the body of the text value before you give it to preservesinglequotes(). Once I realized what I wanted, a very simple UDF did the trick (easier to read and I will use it a lot): CFSCRIPT function EscapeSingleQuotes(x) { return replace(x,','',all); } /CFSCRIPT CFLOOP LIST=#form.rowlist# INDEX=idx CFSET tempVar = fieldstr = '#EscapeSingleQuotes(form[fieldstr_ idx])#' CFQUERY NAME=uddata DATASOURCE=#myDS# UPDATE testtable SET #preservesinglequotes(tempVar)# WHERE rowref = #idx# /CFQUERY /CFLOOP Escaping single quotes often is not enough, many database have escape characters like \. You really should use cfqueryparam: CFLOOP LIST=#form.rowlist# INDEX=idx CFQUERY NAME=uddata DATASOURCE=#myDS# UPDATE testtable SET fieldstr = cfqueryparam cfsqltype=cf_sql_varchar value=#form[fieldstr_ idx]# WHERE rowref = cfqueryparam cfsqltype=cf_sql_integer value=#idx# /CFQUERY /CFLOOP Jochem ~| Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137438 Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com