So basically if there is a typo in the syntax and the code does not compile
it will throw an error and I cannot catch it?
More precisely: if there is a typo, the code does get compiled, but is not
executed.
Since it is not executed, you cannot catch it at execution.
Did you forget the row number or is that typo?
Actually, I'm in a loop on the query, I thought the row number would be
implicit as usual.
But you're right, queryName[column name][queryName.currentRow] does work.
This is kind of weird since queryName.columnName works, bur not
Just forms and cfoutput tags are really going to be the only code in the CMS.
Even so, you cannot have a CFML template create CFML code and expect it to be
executed.
The only way to do it would be to write the code into a file, then CFINCLUDE
it, kind of cumbersome,
especially in a multiuser
If this is MS SQL you can do this as well.
Thanks, but it is not that simple.
I have plenty of things to check, convert, validate, etc.
Don't forget an Excel file is created and filled by humans ;-)
~|
Order the Adobe
Hi, since I installed CF 9 on my desk top, I get this error evry time I open a
CF page for the first time:
Server Error
The Macromedia application server(s) are unreachable.
If I look the services, I can see that
There is also a delayed start option on windows 2008
I'm under XP.
I suspect there is some time limit problem, the JRun server taking too long to
start.
But where can I set this time limit ?
~|
Order the Adobe Coldfusion
http://support.microsoft.com/kb/824344
Scroll down to the part that begins:
I put a 60 sec. time limit, and so far, it works.
Thanks a lot.
~|
Order the Adobe Coldfusion Anthology now!
You do know that Aptana is incorporated into CFBuilder. That would give you
all the CF features missing from Aptana.
Including support for for vtm tag definitions?
~|
Order the Adobe Coldfusion Anthology now!
Hi,
Try recordCount instead of rowCount.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
2. I want the news title to be in the page title, but I cant put an output
before a query that I know of
No, but you can run the query before any HTML, ie :
CFQUERY NAME=myQuery
--- get the tithe in son=me column ---
SELECT title, ...
/CFQUERY
html
head
Why would you want that? br / is the correct way to do it.
br / is the xhtml way to do it and as far as I know, HTML has always been the
standard.
xhtml is just a subset of HTML for those masochists who like make their life
more complicated ;-)
My sentiments exactly.
Sorry, I can't help you.
I designed my own editor because I disliked FCK, and many years after, I still
prefer my own tool.
~|
Order the Adobe Coldfusion Anthology now!
Is there any way to schedule a task in CFadmin more frequently than once a
minute?
Schedule the same task as many times per minute you need, starting at different
times.
~|
Order the Adobe Coldfusion Anthology now!
If the hidden field nam is set on the fly by CF, have CF set another hidden
field containing the name of the first.
~|
Order the Adobe Coldfusion Anthology now!
I tried to give a test to Railo some months ago.
The lack of documentation made me give up after a few days.
I finally upgraded to CF 9.
Documentation is the most important thing for developers.
For the same reason, I hate Mozilla.
It may be many times better than Explorer, but their
Open source, or free, does not automatically equal crappy documentation.
At least for the two examples I gave, YES!
And what kind of docs are you looking for in your browser?
Mostly Javascript and CSS.
As far as HTML is concerned, there are not really differences.
When it comes to CFML programming the docs for Railo
is pretty much the same as ColdFusion.
Pretty much, until you find something that works under CF and does not under
Railo.
Most of the time, it is only a detail, but it can cost you hours.
The least would be some good docs about what's in
This, the lack of simple installation, in my opinion is the biggest
impediment to attracting new people to the CF open source,
Very good point.
Even if CF cannot be qualified as easy to install either.
~|
Order the Adobe
Washington, DC (231)
Baltimore, MD (59)
Charlotte, NC (50)
Omaha, NE (46)
Chicago, IL (41)
Arlington, VA (41)
Los Angeles, CA (39)
Boston, MA (39)
New York, NY (38)
Columbia, MD (35)
Cleveland, OH (34)
Huntsville, AL (29)
Reston, VA (28)
Atlanta, GA (28)
Minneapolis, MN (26)
...
It's much easier to just simply use a custom tag that defaults to no than
to Find and Replace every single tag with addToken=no.
It's not more difficult to replace all occurrences of 'CFLOCATION' by
'CFLOCATION addToken=no'
than by 'CF_LOCATION'
Is it possible using CFIMAGE to create images in 300dpi format for print
quality reasons?
If it is for print quality reason, you need only be concerned with the total
number of pixels.
1. you may very well have an image defined at 300 dpi, but if it is only 300
px wide, you will only get a
Dpi effectively changes the size an image will print at, relative to its
pixel density.
More accurately : dpi is a suggested default setting for the printer that would
eventually print the image so that the image will be printed at the size
specified in the file.
But first, ANY printer will
But all that still leaves us with the question
of how to create a downloadable image file with CF
You're right. If CFimage does not do it, I have no solution.
~|
Order the Adobe Coldfusion Anthology now!
Is there a way to format 24 hour time?
Sure: use HH instead of hh in the mask with the timeFormat() function.
~|
Order the Adobe Coldfusion Anthology now!
This is a tax rate, so I need to get the tax on the subtotal.
cfset tax = #subtot# * .#tx#
Have you tried CFSET tax = subtot * tx /100 ?
~|
Order the Adobe Coldfusion Anthology now!
My email is not showing up in my email box.
Check your anti-spam system.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
I'm trying to save a text file that has foreign characters.
You simply cannot specify a charset in a plain .txt file.
A text file is simply a string of characters in ASCII. Unlike an HTML page, it
does not contain any header to specify a character set.
If it contains special characters above
no, these are not equivalent. windows 1252 is a superset of iso-8859-1.
I meant equivalent in the general meaning not quite identical.
if a text editor/cf is told or can guess the encoding it will read it
successfully.
This is the point. The text editor can be told by the file in which
in which format it is the file is in some proprietary format
... oops, I mean in which format the file is if it is in some proprietary
format...
~|
Order the Adobe Coldfusion Anthology now!
in the presence of a BOM it can guess fairly accurately.
for editors which recognize BOMs, probably, but this suppose a Unicode aware
editor.
~|
Order the Adobe Coldfusion Anthology now!
However, the next set of lines which is supposed to import the data runs but
no data is imported.
You say import, so I suppose you INSERT records from another SELECT.
I also suppose that you have checked if this SELECT actually returns records?
Also, do you have an auto-increment field in this
It's reading an excel file then doing a SQL insert.
I'm affraid you will have to show us some more code.
~|
Order the Adobe Coldfusion Anthology now!
SET ColumnA = '#form.var1#'
WHERE ColumnB IN (#form.var2#)
How ever, make sure you check for form.var2 not being empty, because ColumnB IN
() causes an error.
~|
Order the Adobe Coldfusion Anthology now!
Are you sure you are updating the rows and not adding new ones?
I am sure he is not sure ;-)
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
What am I forgetting to do?
You need to evaluate () the formula since it is define at execution instead of
compilation.
NumberFormat () is a form of evaluation.
Try this :
cfset result2=evaluate (get_result1.fld_test_result fld_formula1
get_result2.fld_test_result fld_formula2)
Probably steal your customers, or prevent you from getting new customers.
I think you could ask Google not to index this domain (better do it before they
do it for yours ;-)
~|
Order the Adobe Coldfusion Anthology now!
Right.
However about CFQUERYPARAM, keep in mind that:
- this will prevent SQL injection, not all form of attacks;
- CFQUERYPARAM makes all values look like parameter 1... in the error
messages, instead of the real values, not really handful when debugging;
- CFQUERYPARAM makes all queries more
Are you implying that cfqueryparam _shouldn't_ be used for these reasons??
No, I'm just saying that there are better and more efficient ways of fighting
attacks.
I use cfqueryparam on some occasions, but not everywhere blindly.
cfqueryparam creates bound sql parameters, which improve query performance.
This is purely theoretical, in practice, the gain in performance is neglectible.
I prefer have a query to take 11 ms and see the values submitted in case of
error, than having the same query take 10 ms, but no
new IT manager, and unless we can find the purchasing documents, he will
wipe the servers.
Talk to his boss and consider wiping the IT manager.
~|
Order the Adobe Coldfusion Anthology now!
It might simply be that the robot is using today information it has on a page
it got on April 12.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
I keep seeing html charcters in the field and the latest entry has 300-400
lines of MS Word html code and, at the very end, the true entry Pierce
amp; Madison Co.s
Is it possible that you are having two fields using the same name in the form ?
2) Those 10 lines will inevitably be 1 line of jQuery
What's the difference between 1 line to call a jQuery function inside a 90k JS
code and 1 line to call a 10 lines function in your own JS code ?
Those 10 lines will work in your favourite browser; then you find
that IE x has some quirk
because there could be a 'myVariable' in another scope
I think CFSET always set a variable in the variables scope when no scope is
specified and do not look in other scopes.
Ie:
CFSET form.test = form.test
CFSET test = test
CFOUTPUT
form.test = #form.test#BR
test = #test#
/CFOUTPUT
This
Yes, the real benefit is that you always know which scope is being
referenced, with no ambiguity.
Actually, there is only ambiguity for those who do not know the language they
are using and its rules by default.
There could be an ambiguity if you are using the same variables names for
Are you under CFMX? Try to remove dbtype=ODBC
This is not valid anymore:
Deprecated the connectString, dbName, dbServer, provider, providerDSN, and sql
attributes, and all values of the dbtype attribute except query. They do not
work, and might cause an error, in releases later than ColdFusion
Carrying 300K of JS code (min) just to do something that takes 10 lines (or
less) of JS code is nonsense.
I agree 100%. I do all my Ajax stuff with only two functions: ajaxGET (url) and
ajaxPOST (url, sendText),
exactly 10 lines each.
Do those 10 lines of code enable you to write different handlers
depending on the status code and success of the http call without any
fuss?
Better than that : they open a new window to display the CF error dump in case
the called template caused an error.
Do they translate common response
Eh? How does jQuery make it easier for folks to get a CF error dump?
Can you explain that?
I was talking about my own code, not jQuery.
~|
Order the Adobe Coldfusion Anthology now!
Have you used jQuery Claude?
I use a couple of libraries in my system, but most of the time, there is
something I need they won't do, or 90% they do I don't need.
I've been developing my own functions far before jQuery existed and even the
term AJAX was invented.
They do exactly what I want
He shows up nameless for Gmail users because of a character encoding
mismatch between Google's mail servers and his mail server.
Actually no, My name is correctly set up in Thunderbird and all messages
replied to me show my name correctly.
Only those forwarded by CF_talk are messed up.
The
So you agree with an incorrect assesment of the size of jQuery? It's
31KB minimized, not 300k.
230k to be more accurate, and about 9000 lines of code in only one file.
The minimized version is 90k and still equivalent to 9000 lines of code to be
compiled.
Again, if one just needs some Ajax
Perhaps, you could build something like this, but in reality it is much
better to have 3 or 4 DIFFERENT cars for different purposes.
Or even only ONE if you have only one purpose!
~|
Order the Adobe Coldfusion Anthology now!
Why reinvent the wheel over and over
Please explain why writing code BEFORE the equivalent exists in some open
source library is REinventing the wheel.
Example:
When I first looked for a good online editor I could find no one able to clean
up MS Word crap.
So I designed my own, about 10
That's an interesting anecdote, however I don't see how it relates to the
topic at hand.
It does in the sense If you are capable of developing your own tools, it could
be a better and more efficient solution.
If you're not, then use some other's.
But he's no longer on CF5
He was on CF4.5! ;-)
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
The Production jQuery core is 31KB, minified and gzipped,
This is for the packed version, but it must be unpacked before it is used
on client side, which requires non-trivial client-side processing time
according to the same official jQuery site.
The minimized uncompressed version is exactly
90k and 9000 lines of code is *nothing*
It may be nothing, but if all you need is access to Ajax facilities, it is
still 900 times bigger than necessary.
And since I started developing applications, I obey this fundamental principle:
NEVER USE CODE 900 TIMES BIGGER THAN NECESSARY.
Non-scoped version ALWAYS runs 5-15 times FASTER than the scoped version!
This is on CF8, 32-bit, 4 CPU Dell Server, Windows 2003. Could somebody run
this on CF9 32/64 bit?
Exactly the same here under CF9.
I inverted the two loops ie: scope first and non-scope second, just in case,
and
Hi,
After 8 years of good and faithful service, my development PC under XP passed
away.
So I'm now struggling with reinstallation of everything under a new Windows 7
system.
The good new, I was able to install CF Studio, in XP compatibility mode.
But I know have a problem trying to install CF
OK, I finally got it working by changing the compatibility of the file from
Windows 7 to XP.
Very brillant from Adobe to provide an install for a 64bit product that won't
run on Windows 7 :-(
But now I have another problem :
Every time I open a CF file, I get this error:
Either the Macromedia
Did you open the administrator to finish the install?
The administrator won't even open since the CF server is not operational.
However, after at least a dozen of tries, I finally managed to have an
operational system, don't ask me how I did it, I don't even remember.
Now I'm having another
it's Windows
making sure that no processes run with administrator rights without
your explicit permission.
I've been working for 8 years under XP, nobody ever asked me for permission,
though I never got something installed I did'nt want.
I guess I could go on another 8 years without this kind
Access isn't an option with a 64-bit CF install.
Well, you may be right that it is not an option in the sense it is not
possible, but the Access driver does appear in the options.
~|
Order the Adobe Coldfusion Anthology now!
Access isn't an option with a 64-bit CF install.
I've read somewhere than is is possible to have 64 bit ASP applications to use
32 bit ODBC drivers.
Too bad this is not available in CF.
~|
Order the Adobe Coldfusion Anthology
I would suggest to avoid using Access
anyway, it can be the cause stability issues on CF
I know I know, This is true for multi user Access applications, programmed
inside the Acces database.
The problem must be in the way locks are managed in VBscript.
As far as CF is concerned, this is pure
It still becomes a problem because it is not designed to handle large
amounts of a data.
Well, it depends on what is meant by large amount and if you do need large
amount of data.
Of course, there are more powerfull databases systems.
But for my kind of applications (CMS and members managing
The bigger problem, though, is that Jet isn't
really designed for a high-volume multiple user environment.
OK, but it still does the job perfectly for applications that does not need a
high-volume multiple user environment. ;-)
problems with Access are pure urban legend
Exactly: the way it is exagerated, with no nuance: Access is evil, this is
urban legend.
The truth is that Access is intended for small database applications, and for
small database applications, it is just perfect.
Now if you use it for very large
Access isn't an option with a 64-bit CF install.
I've read somewhere than is is possible to have 64 bit ASP applications to use
32 bit ODBC drivers.
Too bad this is not available in CF.
Actually, there is a solution, and it works:
See
Hi,
Now that I have CF9 running WITH ACCESS databases ;-) under 64 bit Window 7,
I'm facing the problem of replacing 32 bits CFXs.
One of them I've been using far before CFIMAGE was implemented in CF is
imageCR3.
There is a 64bit version of imageCR3, but it is not free, and before I buy it,
I think MSAccess only uses *, not %
In pure Access SQL yes, but % is correctly translated by the ODBC driver.
~|
Order the Adobe Coldfusion Anthology now!
have you got a cfoutput around that ?
No CFOUTPUT is need inside CFQUERY and CFMAIL tags.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
Too few parameters. Expected 1.
This error means than 1 column name is unknown in the table.
Here it must be lastname
~|
Order the Adobe Coldfusion Anthology now!
Please post what you find out because most of my applications are dependent
on the CFX_ImageCR3
I finally decided to install the CF 32 bit version on my W 7 development PC.
I could get around many of the uncompatibilities, but since my production
server is 32-bit I found not reasonable to have
Hi,
I've noticed that application.cfm is indeed run before the template called in
the url, but the template itself is compiled BEFORE application.cfm is called.
I need to have the ability in application.cfm to run some code and NOT compile
the template.
Is it possible ?
CF 9
The CFML must be compiled in order for Java to execute it
Sure, but actually I don't want to execute the file, nor compile it.
Yhe file is actually a pdf file under .cfm extension.
This is to force execution of an application.cfm first in which I check if the
user is authorized to open the
I can't think of a logical case for
this, and would love to hear it if you have one.
Please see my othe reply.
When an administrator uploads some document ie: myDoc.pdf, it is stored as
myDoc.pdf.cfm
When a user tries to open directly myDoc.pdf.cfm in the url, the document is
protected by
But I am at a loss to explain how a PDF is going to throw a CF Exception
error, when using cfcontent to deliver the file it should not be trying to
compile that content.
The error is not thrown using cfcontent, but simply when CF compiles the file
when the HTTP request is received, before even
A better way to achieve what you want is to password protect certain folders
on your site
I never use authentication on the server.
Only through CF, since the administrators of my CMS can add/edit their own
users, sometime 1000s of members.
The admin can still edit users, even 1000's
Which admin? Window's or CF?
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
I agree to both Steven and Azadi's solution.
Of course I know this solution. I thought I had a simpler one.
Someone can rename a CFM file
to a PDF file and upload it. Now that CFM code can be executed on the
server.
No way. Even if the pseudo pdf file actually contains CFML code, it cannot
the admin of your CMS
Of course, this is the way it works, but you were talking about password
protect certain folders.
I don't see how this can be done by CF code when files other than .cfm or .cfc
are requested by HTTP and the CF server is not even invoked.
In Claude's original question, it doesn't appear he's using CFCONTENT:
Yes I am.
Here is a summary of the code in application.cfm:
You can see that the requested file is never executed nor intended to.
The only purpose of the .cfm extension is to force the execution of the
application.cfm
You keep talking about templates being compiled, if there is an error as you
have mentioned this will stop the compile of the template and it will look
like it is being complied before the other.
This is what happens indeed. There a compile error because the pdf file happens
to contain some
I will ask another question, is this application.cfm in the directory of the
template in question,
Yes, of course, and it include higher lever application.cfm
But you really need to work out why it is trying to compile the PDF as a
CFML template,
Again, since application.cfm is to be
Now if you are 100% confident that your PDF is being delivered by the
cfcontent tag, then it sounds like you may have come across a bug.
No, the pdf is not delivered in case of an error, since it is a compile error,
no code is executed.
For years I've been using this trick, and no file even
I think you don't understand,
I think you don't understand that I perfectly understand what's hapening:
Although I assumed the template (pdf file) should not be compiled since never
executed,
it IS compiled. This causes the syntax error and stops execution.
You are not taking into
My guess is that the compiler takes lots of extra time and resources, so it
does all its work before getting into the execution process.
May be, however it will also compile some files for nothing, ie: included files
actually not included at execution... which represents an extra overhead.
I would write first some mini syntax analyser to find all text in between
CFOUTPUT... and /CFOUTPUT,
keeping in mind that they may be stacked in several levels.
Then for each string found, use regexp to find single # followed by any
character illegal in a variable name before a next # or end of
try reversing the quotes, using double quotes in a query shouldn't actually
work anyway.
Exact. But then the problem may arise with single quotes in the parameter.
Allowing single or double quotes in an id field in a database is looking for
trouble.
If quotes are not supposed to be used, may
CF will attempt to compile it.
My assumption was it was not compiled if not executed, but from my very first
post I know it is not the case.
My question was is it possible to get around this.
I got about 50 answers to explain what I already knew, but none to my question.
So I conclude that
because you don't share the code
I did sent all the code, you probably missed it.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
Yes you did but I also asked for the PDF in question so that I could run
some tests as well, maybe you missed that:-)
I didn't miss it. The content of the pdf has absolutely no interest.
I told you it hapened to contain somewhere a string cf, the rest making an
invalid CF tag.
This is enough
The alternative, though, would be
for the executing process to run your first program before compiling
the second, which sounds like it would be generally an inefficient
thing to do - the more times control has to be passed from one process
to another, the longer things generally take. And
I strongly believe that if
you are using cfcontent to deliver a file with the extension of PDF then it
*SHOULD* not compile that file, only the template it is being called from.
What you don't understand is that the file somefile.pdf.cfm
IS the actual somefile.pdf file simply renamed
just weird seeing cfabort rather than cfexit
method=exittemplate / which is better as you know that the application
will eventually fall down to onRequestEnd.cfm were as cfabort will not.
When you use CFCONTENT to deliver content, there is nothing else needed to be
done, except terminate the
Or you may simply not want to waste time processing code that's
unnecessary for a specific request.
... and you might even use no onRequestEnd at all ;-)
~|
Order the Adobe Coldfusion Anthology now!
Actually cfabort was introduced as a debugging tag.
Really?
Note that I use CFABORT because I was not sure CFCONTENT will cause processing
to stop.
It is not specified in the docs, but it does, so I could remove the CFABORT tag
after CFCONTENT
There is still a good reason for CFABORT: stop
CFDOCUMENT allows for conversion from MSword to a pdf.
Any one having experience with this?
Any problem or restriction?
Does it supports 2007 format (docx)?
Thanks.
~|
Order the Adobe Coldfusion Anthology now!
101 - 200 of 518 matches
Mail list logo