cfc

returning multiple stored procedure result sets from a cfc

血红的双手。 提交于 2019-12-07 15:31:02
问题 I am trying to convert some pages from my app to use cfc's, and one page uses a stored procedure to retrieve a couple sets of data. Now when I access the results, they act just like a if I used a <cfquery> tag, and all of the functionality that gives. So now I am trying to use this same stored procedure in a cfc that I am building, and I would like to be able access the results in the same manner, and there in lies my problem. I'm not sure how to return multiple queries from the function,

How can I run a ColdFusion scheduled task at an interval <60 seconds?

倖福魔咒の 提交于 2019-12-06 21:17:22
问题 I have a CFC method that I would like to run at an interval of 30 seconds. However, the problem is ColdFusion won't let me schedule a task that runs at an interval of 60 seconds or lower. Does anyone have a suggestion about how I can (and should) accomplish this? To preemptively answer the question "What happens when your script runs longer than 30 seconds," or any other question like that, I have already taken all that under consideration and it is not a concern. I'm running ColdFusion 8.0.1

Dynamic Variable Names Coldfusion

牧云@^-^@ 提交于 2019-12-06 12:09:13
Hey Guys, I'm having a tad of an issue dealing with Dynamic Variable Names. What is happening is I have a CFC that builds part of form for me using some data in a table. Then the cfc sends the form's code back to the page as a string. Well I need to assign values to these form fields so people don't overwrite the data. I'm pulling the data in the function in the cfc. So I'm trying to throw this dynamic variable into the string and it is messing things up for me. I keep getting an error saying A CFML variable name cannot end with a "." character. Here is the code I'm using that gives me the

How can I send javascript object to a remote CFC Component

不羁岁月 提交于 2019-12-06 04:03:15
问题 I have created a javascript object var spanglist = { one: q1, two:q2, three:q3, four: q4}; I create the ajax jquery object to send the data to the CFC: $.ajax({ url: 'gridly/components/pay.cfc', type:"POST", dataType:' json', data: {method: "structFromJSobjt", returnFormat:"json", jsStruct: spanglist} }); in my cfc I have the following simple code: <cffunction name="structFromJSobj" access="remote" output="false" > <cfargument name="jsStruct" required="true" default="" /> <!--- AT this point

returning multiple stored procedure result sets from a cfc

和自甴很熟 提交于 2019-12-05 20:51:27
I am trying to convert some pages from my app to use cfc's, and one page uses a stored procedure to retrieve a couple sets of data. Now when I access the results, they act just like a if I used a <cfquery> tag, and all of the functionality that gives. So now I am trying to use this same stored procedure in a cfc that I am building, and I would like to be able access the results in the same manner, and there in lies my problem. I'm not sure how to return multiple queries from the function, without creating an array, which I have started. By the way, the function is incomplete. I was just trying

How do I reset application.cfc without resetting the server instance? [duplicate]

我的梦境 提交于 2019-12-05 10:48:59
This question already has answers here : Closed 7 years ago . Possible Duplicate: restart application without restarting server? How do I reset a Coldfusion Application / application.cfc without resetting the Coldfusion Server instance? If I remember right, there are a few tricks out there such as creating a reinit function within application.cfc or renaming the file. A couple of steps: First, make sure all your application initialization logic is contained inside the OnApplicationStart method of your CFC. If it has nested calls, that is fine - just so long as you can re-initialize your

How can I run a ColdFusion scheduled task at an interval <60 seconds?

梦想的初衷 提交于 2019-12-05 02:13:17
I have a CFC method that I would like to run at an interval of 30 seconds. However, the problem is ColdFusion won't let me schedule a task that runs at an interval of 60 seconds or lower. Does anyone have a suggestion about how I can (and should) accomplish this? To preemptively answer the question "What happens when your script runs longer than 30 seconds," or any other question like that, I have already taken all that under consideration and it is not a concern. I'm running ColdFusion 8.0.1 (w/ hotfix 4) on Windows Server 2003 (IIS6). As a side note, I'm using Java 1.6u21 as my JVM for

Why does a long cfc file work in CF8, but not CF9? Getting “Branch target offset too large for short” error

廉价感情. 提交于 2019-12-04 05:06:44
问题 I have a fairly long cfc file, about 1800 lines long, that worked fine in ColdFusion 8, but after upgrading my development system to ColdFusion 9 and doing some testing I get a compile error for a cfc and the message says "Branch target offset too large for short". I modified the file to eliminate some unused functions and consolidated one to make it shorter and this resolved the problem to get it to work. But still, why did it die on me now when I upgraded to CF9? Anyone else run into this

Why does a long cfc file work in CF8, but not CF9? Getting “Branch target offset too large for short” error

那年仲夏 提交于 2019-12-02 05:11:14
I have a fairly long cfc file, about 1800 lines long, that worked fine in ColdFusion 8, but after upgrading my development system to ColdFusion 9 and doing some testing I get a compile error for a cfc and the message says "Branch target offset too large for short". I modified the file to eliminate some unused functions and consolidated one to make it shorter and this resolved the problem to get it to work. But still, why did it die on me now when I upgraded to CF9? Anyone else run into this problem in previous or the current version of ColdFusion? Are there any solutions other than modifying

How do I force a Coldfusion cfc to output numeric data over JSON as a string?

我是研究僧i 提交于 2019-12-01 21:38:10
问题 I'm calling a Coldfusion component (cfc) using jQuery.post(). I need an integer or string representation of the number returned for use in a URL. {"PAGE":"My Page Title","ID":19382} or {"PAGE":"My Page Title","ID":"19382"} Instead what I get back is a decimal: {"PAGE":"My Page Title","ID":19382.0} Needed to update the following HTML: <a href="page.cfm?id=19382" id="pagelink">My Page Title</a> Conceptually, I suppose there are multiple answers: 1) I could use jQuery to grab the number left of