Questions
Recently active
Hello,I am trying to write a wrapper function to be able to work with queries in cfscript (I deal with CF MX7). The SQL string can be assembled and passed to the function as an argument. Here is the function:<cffunction name="QUERY" access="public" returntype="query"> <cfargument name="SQLString" type="string" required="yes"> <cfargument name="Datasource" type="string" required="no" default="#this.dsn#"> <cfargument name="dbType" type="string" required="no" default=""> <CFQUERY NAME="QryToReturn" Datasource="#arguments.Datasource#" dbtype="#arguments.dbType#"> #preserveSingleQuotes(arguments.SQLString)# </CFQUERY> <cfreturn QryToReturn></cffunction>When it's as simple as this it works:<cfscript> Variables.iMyValue = 10; sSQL = "SELECT * FROM t_test WHERE field1 = #Variables.iMyValue#"; Variables.qry1 = QUERY(SQLString: sSQL, DATASOURCE: Application.sDataSrc, DBTYPE: Application.s
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusionBuilder/2.0/Using/WSf01dbd23413dda0e1736ebc1213a528ab0-7feb.html
Hello!I'm using CF8 and Oracle 11g and In one of my app., I applied 4 simple delete/truncate statements.These statements are used to clean up 4 temporary tables everytime this app. starts.For a few weeks I have not seen anything wrong with it until one day the result produced by this app show duplicates data.On my investigation I found out that 4 of my Truncate statements did not truncate the data, so previous data were process again and again...Then I made some changes:FROM:<cfquery name="OriginalQuery" datasource="mytestDB"> Truncate table temp_table1 Truncate table temp_table2 Truncate table temp_table3 Truncate table temp_table4</cfquery>INTO:<cfquery name="OriginalQuery1" datasource="mytestDB"> Truncate table temp_table1</cfquery><cfquery name="OriginalQuery2" datasource="mytestDB"> Truncate table temp_table2</cfquery><cfquery name="OriginalQuery3" datasource="mytestDB"> Truncate table temp_table3&
I have successfully download and installed CF10. Admin tools comes up and seem to work with all needed connections (email and Data sources to be specific). However, I cannot run my current site without CF9 being up and running? Did I miss a configuration? DOes CF10 need to know where my code is and NOT IIS? Where can I get Technical help to debug? ...Help..
Hello, everyone.I'm working on a form that will add/edit task details. One of the requirements is the ability to upload files into the database.If a task is being EDITED, the upload is no problem; I'm using a hidden iframe to handle the upload, and the task will have a task ID that the file will be associated with.However, if a task is being ADDED, there is no existing task ID, so the file needs to be uploaded with the rest of the form. Unfortunately, jQuery .post() using the .serialize() attribute for the form breaks file uploads, because the form isn't multipart/form-data, at that point.Does anyone have any suggestions on how to allow a file upload if the form is being submit via jQuery.post("document.cfm",serialize(formobject))?Thank you,^_^
Hello, everyone.I'm trying to search more than one Solr collection for a keyword (let's say "Item A"), but I want to remove any duplicates and keep the ranking.Hypothetically, let's say each collection has "Item A" in it, each ranked slightly different in their respective collection (99.9, 92.7, and 89.5). How would I remove the two lower ranked "Item A"'s from the CFSEARCH?Thank you,^_^
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-6790.html
Hey,I have a INSERT cfquery to a Mysql database (Joomla website table) that returns the following error "Error Executing Database Query." and no additional information.<cfquery datasource="mysql" name="joomla_add_article" result="joomla2_rez"> INSERT INTO db.jos_content (`title`, `alias`, `introtext`, `state`, `sectionid`, `catid`, `created`, `created_by`, `publish_up`, `attribs`, `ordering`, `metadata`) VALUES ('Title - #LSDateFormat(Now(), "dd.mm.yyyy")# - #LSTimeFormat(Now(), "HH:mm")#', CONCAT('title-',LAST_INSERT_ID()+1), '<p> <object width="640" height="480"> <param name="movie" value="http://domain.com/smp2/StrobeMediaPlayback.swf" /> <param name="flashvars" value="src=rtmp%3A%2F%2Fdomain.com%2Fdvr%2Fmp4%3A#replace("#arguments.filename#","/","%2F","All")#&streamType=recorded&verbose=true" /> &nb
Hello all,Who can help me on this : I am trying to update simultaneously all data returned with a simple cfoutput query, where all form tags are indexed with all the id(s) returned by the query (same serie of input/textarea/etc. for each id, but only one single validation button for all id). I am stuck and cannot find a way to do this. Would someone have a simple example of how I could proceed ? That would save my life...ThanksJean
My old code would print a certificate for a user once they pass a test stored in an Access Database. Once the provider upgrade to CF10 the cf_pdf changes to cfpdf and then that is where i get lost. This code no longer works and I do not know where to start to make this work. Any suggestion would be helpful. Once I change the tags to cfpdf, then I get more errors such as DDX which is new to me.--------------------<cfif GetAuthUser() is not ""> <cfquery datasource="GetHelpNow" name="Get"> SELECT * FROM Users WHERE user_id = #GetAuthUser()# </cfquery> <cf
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fa9.html
I'm in the process of converting my personal website from PHP to CF9 (I wanted CF10, but apparently CF10/Linux is hard to come by), and when importing my existing blog posts into the new database, I've wound up with unexpected date stamps for the posts.A post from November of last year has turned into August of some 5-digit year. I'm assuming this is a unix time thing, and since I'll be using #now()# for future posts, I'll need to convert the existing posts to use the new format.I'm thinking I can just do an update query, but I have no idea how to turn the existing timestamps into something that DateFormat() will be able to format correctly. Any advice?
I set up the following SELECT * test on a table with a huge number of rows, just to make sure the query would run over 1 second:<cfquery name="test" datasource="#ds#" timeout="1"> SELECT * FROM request_stats</cfquery>The debugging info indicates that the query took 2539ms, but instead of throwing an error the query ran & returned results. Maybe I am not understanding how the timeout attribute should work? The CF docs indicate that "Because the timeout attribute only affects the maximum time for each suboperation of a query, the cumulative time may exceed its value" -- but does a simple query like this one have suboperations? I'm using CF9.
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c6e.html
Hello, everyone.According to the CFML Ref for CFFILE/UPLOAD, "The browser uses the file extension to determine file type."We all know that this isn't the most secure way of determining a file mimetype. Has anyone discovered or invented a way to have CF Server actually look at the code of the file being uploaded to determine the mimetype?Thanks,^_^
We have recently upgraded to CF10 on a new server install of Windows Server Web 2007 32 bit IIS 7.Our Google checkout callback section has stopped working and it seems to be a CFHTTP problem. The cfhttp outgoing/GET calls work fine, it's just incomming/POST calls that don't work. We have replicated this with the following code. <cfsavecontent variable="strXML"><?xml version="1.0" encoding="UTF-8"?><new-order-notification xmlns="http://checkout.google.com/schema/2" serial-number="725311029182564-00001-7">...</new-order-notification></cfsavecontent><cfhttp url="http://zzz.cfm" method="POST" result="objGet"><cfhttpparam type="XML" value="#strXML.Trim()#"/></cfhttp >Posting to external services like our bank and UPS work, even over SSL. So I don't think it's a certificate issue especially as it fails with both https and http.In the HTTP log we get what you expect when using GET to an external server, and works on our internal server"Informati
I've installed ColdFusion 10 on my Windows VPS, running IIS 7.5. The VPS is managed through Plesk 11.Everything works great if I'm just trying to access an HTML file as shown here: http://broncotime.info. However, if I try to access a .cfm page, I get a login screen that prompts for my User Name and Password, see http://broncotime.info/index.cfm If I hit cancel while logged in locally on the server, I'll see the error message:HTTP Error 401.3 - UnauthorizedYou do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.Error Code: 0x80070005Physical Path: C:\Inetpub\vhosts\econsummit.secureserver.net\broncotime.info\index.cfm From everything I've read, including the on-page 'likely causes', it's an issue where the user doesn't have the correct permissions. However, I've updated all the files within C:\Inetpub\vhosts\econsummit.secureserver.net\broncotime.info\ and c:\ColdFu
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7995.html
in the mail server setings CF10 will not let me submit domain\username in the user name field and shows domainusername without the backslash.
Im using CF MX7 for my website. And since this version doesn't support cfimage tag, I looked for other helpful CF commands to resize photos. Then I found this imagecfc object. It somehow helped but not for long. Since it constantly giving out of memory errors to users, I decided to abandon it. Now here's the problem. Some users (not all) uploading photos in my site were still able to resize photos although I have removed that CF component to my code. How did that happen?Please help. And do you have any suggestion to how to resize photos in MX7?
I'm trying to get a form with three connected <cfselect> statements. The code works in all browsers except IE. Does anyone have any suggestions.When it runs in IE I get the following error.bind: Bind failed, element not found: specGroupIDbind: Bind failed, element not found: specCategoryIDCFSELECT Code:<cfform name="specCategories" id="specCategories"> <ol> <li> <label for="categoryID">Category</label> <cfselect name="categoryID" id="specCategoryID" &n
i am a little confused with CF10 as far as how to configure the CFAdmin such that it displays error messages in the browser. Is it possible to display error messages in the browser to specific IP addresses, but show all other users standard error handling messages?
I'm using CF 8 and have a simple script that uses cfexecute to invoke a FoxPro executable that resides on the server. The server is a Windows 7 machine, and when I call the script from the browser I can see the process running in Task Manager but it is hung and doesn't do anything. I have to manually kill it. No errors are being generated that I am aware of - no errors reported in the Event Viewer or in Process Monitor. Coldfusion is running the process under the System account, so I think it should have plenty of privileges. The cfexecute statement is: <cfexecute name = "C:\Temp\Simple.exe" arguments = "" outputfile="c:\temp\Simple.log" timeout = "30"> </cfexecute>Any help will be appreciated.
Hi,The Server monitor in ColdFusion 10 is showing the Cached query count as 12212 (and rising) even though the Maximum number of cached queries is set at 9000, how can I stop the actual Cached Query count from exceeding this limit and just exponentially growing?Many thanks,Chris
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c6e.html
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.