For years I have researched and tried to resolve the continuing occurrence of JRUN errors on my ColdFusion MX 6.1 Web application servers. I found several band aid solutions, and many suggestions that were just not the cause of the problem. Alas! I have figured out why this happens and how to prevent it.
If you are experiencing JRUN Error Connection Closed, there is one simple thing that you need to do: For every Microsoft Access data source that you setup, under "Advanced Settings", you need to check the box that is labeled "Limit Connections", and you need to restrict connections to 1. This is because the ODBC driver for Microsoft Access was not designed to handle multiple connections in a live environment since Microsoft Access was never really designed for higher level applications. The driver simply crashes when a second connection is opened. So, your settings should look like this:

In case this doesn't fix your problem, here are some links to other possible causes of JRUN Errors.
This is actually really simple, but I stumbled across it, so I figured I would throw it up here:
If you have an array or list of text string elements that you want to sort alphabetically, ColdFusion has a built in function for just that - ArraySort or List Sort
Note: ArraySort only works with one dimensional arrays. If you have multi-dimensional arrays that you want to sort, you should first concatenate the columns into one delimited list to store in a one dimensional array. In other words, if you have:
MyArray = ArrayNew(2);
MyArray[1][1] = "x";
MyArray[1][2] = "hello";
... you will need to change this to:
MyArray = ArrayNew(1);
MyArray[1] = "x,hello";
... or something along those lines. Ok, so back to the task at hand. Sorting lists or one dimensional arrays is very simple. See the code below:
<cfscript>
MySortedList = ListSort("x=hello&a=1&c=3&b=2", "textnocase", "ASC");
MyArray = ArrayNew(1);
MyArray[1] = "x=hello";
MyArray[2] = "a=1";
MyArray[3] ="c=3";
MyArray[4] = "b=2";
MySortedArray = ArraySort(MyArray, "text", "DESC");
</cfscript>
Here is some Adobe ColdFusion documentation on this matter: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000397.htm
Hope that is useful to some one.
Thank you for visiting the ColdFusion Source website.
We are currently in the process of further developing this website to provide you with more relevant and useful tutorials, tips, tricks, sample code, custom tags, etc using the Adobe ColdFusion programming language.
Please check back soon, or register here to be notified when the website is re-launched.