Many times we have been tasked with working out a way for an ordinary user to "upload" data into a system. This task is fraught with peril because users are not well versed in the idea of "normalized" data. We've tried the Excel file approach. Excel gives the user so many neat options they can't resist adding formatting, charts, graphs and fiddling with the headers. Even with protected files, clever users find ways to make the data incomplete or unusable. We've also tried access. This is workable but it takes more setup and it requires extra expense on the part of the user (namely, they must have excel). Enter the famed low-tech "csv" or "comma separated value" file.Read More
It's a good question. Performance depends on many thing including hardware, traffic, tuning, and capacity. Still, 1.5 million rows is a large table and as you might imagine it will perform less ably than a table with just a few hundred thousand rows. Let’s talk about these variables and how they are used.Read More
First let me say that you may have overestimated your friends programming skills. There is a fundamental difference between using cfinclude and displaying an image. the difference is that one of them has to do with Coldfusion and the other one simply doesn't have anything to do with Coldfusion. Let's review what happens when you load a coldfusion page with an image in it.Read More
You know I love the easy ones. Your problem is misunderstanding the proper use of cfinclude. This tag passes the contents of the included file to the CF parser for execution. It's designed to compile into run time code. What you are trying to do is simply insert the contents of a file into the output buffer (the stuff that goes back to the browser). For that you can use cffile. Cffile will read the contents of your file into a variable - which you may then output onto the page. Here's an example.
Notice the use of the expandPath() function. Unlike cfinclude which takes a relative Coldfusion path, cffile needs an absolute path. It needs something that looks like c:\inetpub\wwwroot\blah.txt (or maybe /var/home/www-data/blah.txt on a linux server). ExpandPath( ) is one of those can't-live-without-it functions that allows you to insert the path in a relative fashion.
In your question you indicated that you did not want the HTML to be "functional". I'm not sure what you mean by this - but I suspect you meant that you want the HTML to display on the page like "
This is a follow post to my previous post on cfdirectory as a bottleneck. A helpful muse reader of that post named Daniel Gracia sent me some Java code that builds a directory list. The code itself is a call to the core io.File class. It takes a directory path and returns an array of files and folders mixed (with the folders identified with a period). His claim was that it performed faster than Cfdirectory. His claim is 100% true, but there are some nuances to it. I ran a few tests and here is what I found.Read More
I just read this fabulous post from Mike Schierberl's blog on Variables Scope Leaking and I thought I would pass it on as a good read. To summarize, it is a common practice to create a component into the application scope and include an "init()" type function in it that returns an instance of itself. For example you might have an "employee" component who's "init()" function takes an employee id as an argument and returns an instance of "employee" populated with user data. That's pretty standard. If you return this new populated instance into the variables scope you would expect the variable to be discarded at the end of the request. Mike's post shows that this does not happen as expected. Because the variables returned are referenced (as apposed to "by value") they persist beyond the request termination.
As a fix you can add structClear(variables) to the end of your request - in the onRequestEnd() function for example. I can't explain it better than Mike. He includes a sample and a flash movie of how he came to his conclusions. It's very thorough.
Flash remoting is supposed to be enabled by default. Indeed, if you set up a web server, add some sites and then install CFMX flash remoting works fine. If, however, you are in the habit of adding new sites to your IIS server that are going to use flash remoting, it may not work. A virtual directory to JrunScripts and some other settings are missing. The fix? Well, one easy "shotgun" approach is simply to run the connector script. It sets things up correctly and remoting starts to work. But (as is often the case) there is a small issue you might run into.Read More