Do the methods have access=remote on them?
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
With queryparam you don't need the createODBCDate() function:
SELECT blah
FROM tblCalendar
WHERE EventDate BETWEENcfqueryparam cfsqltype=CF_SQL_DATE
value=#form.someStartDate# /
AND cfqueryparam cfsqltype=CF_SQL_DATE value=#form.someEndDate# /
Also, note that in SQL Server,
The following will only execute the stuff inside the CFIF statement if the
count is *not* a multiple of 6.
cfloop from=1 to=96 index=i
cfif i mod 6
!--- do whatever you need to ---
/cfif
/cfloop
~|
Want to reach the
Have had good luck with hardware load balancing from Coyote Point. We used
client vars so that sessions weren't lost even when users were moved across
4-5 servers, but cookies should provide you the same behavior. Works
especially well if you've got your uploaded files in a single shared
cfloop list=#form.whatToUpdate# index=i
cfset form.ID = i /
cfset form.newRank = form[rank_ i ] /
/cfloop
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion
Include it in the onSessionStart method of Application.cfc and it will run
only once per login.
If you really only want it once per day (if, for example, users sometimes
logout/in several times per day), then you could add a date test to the log
INSERT query:
cfquery ...
IF NOT EXISTS (
First check that the necessary columns are set to ntext or nvarchar, not text
or varchar. If that's not the issue then put the N in front of each, as Paul
mentioned. If that doesn't work, then what version of SQL Server are you on
... older versions may not support 8-bit entries ...
never
As a hack to your script, how about adding a simple string test?
cfif not isValid(email, emailVal) or emailVal is not trim(emailVal)
... handle exception ...
/cfif
That would leverage isValid() for the actual string content, but it would
separately catch any address that hadn't been trimmed.
Note that an empty value will cause the IN statement to fail, so depending
on the input I sometimes need to do something like this:
SELECT stuff
FROM somewhere
cfif listLen(form.listOfIDs)
WHERE id IN (cfqueryparam list=true value=#Form.ListOfIds#
cfsqltype=cf_sql_integer/)
/cfif
We always had good luck with hardware load balancers from Coyote Point,
managing connections to 4 or 5 clustered web servers. For apps that needed to
maintain seamless persistence, we used client vars (stored in the central DB),
which allows the application to keep a running connection to a
+1 for CrystalTech ... been using them happily for several years now.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
Doesn't matter at all. CF just interacts with the web server ... that's
all. If you had code that used machinename, that would be an issue, but
the server installation is unrelated.
~|
Want to reach the ColdFusion community
Could it be that they are coded as CYMK images? It's a jpeg format that
browsers and Adobe's ColdFusion Image engine cannot handle. Save them
back out as RGB (the web version vs the print version) and you may be
all right.
No, you shouldn't need to specify end, but make sure there's a timeout
sufficient for the process to complete.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion
I do a similar check with #not isDate(arguments.startDate)# with
cf_sql_date types as well. Handy little trick being able to drop the
NOT in there like that.
~|
Want to reach the ColdFusion community with something they want?
Just a note that the CFTRANSACTION needs to be around the entire block
of CFQUERY statements, or else it does you no good ...
cftransaction
cftry
cfquery
DELETE some stuff
/cfquery
cfquery
INSERT some stuff
/cfquery
cfquery
UPDATE some other stuff
/cfquery
cfcatch type=Database
trap your error
Have been very happy with CrystalTech. About $24 / quarter on shared
hosting, and they've been solid. Lots of file space and plenty of DB space
for my needs.
~|
Want to reach the ColdFusion community with something they
Have not used CollabNet, but the install from VisualSVN took about 20
minutes a year ago and we haven't had to touch it since except to
install update patches, which have been seamless. Definitely solid.
~|
Want to reach the
@Justin,
I had been giving CFB a decent run for its money, but still lovin'
HomeSite+ for all the reasons you list. For me, the move to Windows 7
64-bit at home means that I cannot even install HS, let alone use it, so
I've been having to give it a full focus effort. So far, I don't mind
+1 for LongTail player. Easy to implement, very good JavaScript controls. We
have implemented on both ColdFusion and ASP.NET sites and been very happy with
it. Just need to get the player and the JS library and then code your videos
as FLV files. Pretty slick.
On Mon, Nov 9, 2009 at 5:20
Yes, in the methods of Application.cfc, you need to specify the scope,
including the Application scope. For Application attributes
(sessiontimeout, name, etc), you can specify those in the THIS scope,
but only outside the methods:
cfcomponent
cfset this.name = myApp /
cfset
I've done the try / catch block before, and it does work. I would test
the primary AD first and then on any error, I would check the secondary
AD server. Worked quite well, actually.
~|
Want to reach the ColdFusion community
I don't remember what version of CF you said you were running (and the
HoF site's not responding), but using CFLOCATION directly after CFSET
session.blah = form.foo will actually fail to set the session in CF6.1
and before. Can't remember if this affects 7 or not, but I don't think so.
Figure out which popup is being called (generally a .html file) and
rename it as .cfm and then find all the references to the .html file and
change them to .cfm (generally the calls are in fckeditor.js or one of
the plugins/*/*.js libraries). Once you have the popup in CFML you can
do all
Need more information ... what type of data is in the checkbox values?
how is the table set up? how does the checkbox data relate to the other
data in the form and in the table(s)?
~|
Want to reach the ColdFusion community
So, Ext.isReady is like $(document).ready() in jQuery ... good to know
if I ever play around with Ext. It's a convention in jQuery to wrap all
those sorts of functions in a ready() call for just this reason:
$(document).ready().function {
doMyStuffNowThatWeAreDoneLoading();
}
You can put requestTimeout=[seconds] right into the URL, IIRC.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
I just love that the video labels him a manualist ... awesome.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
I've got a BA and an MA, but neither one is in CS or MIS ... Classics
(Ancient Greek and Latin). The 'requirement' of CS / MIS schooling tends
to come from HR, rather than IT hiring managers. Not always true, but
often. Completely agree that the degree is immaterial vs the demonstrated
If you're putting the data on 10 different tabs, then only call or render
the data for the first one and use DHTML / Ajax to load the each other tab
only when a user clicks on it. Basically, it's slow right now simply
because the size of the HTML document being returned to the user is
If stcXml.country.cities.xmlChildren is empty, then the first pass at
index=1 would be invalid. Can you verify that the the XML has at least 1
cities child?
~|
Want to reach the ColdFusion community with something they
I'd need to see the datatype of the zipcode column as well as the content
of the 'valid zipcode' variable before I could answer the question, but my
guess would be that there's a discrepancy in datatype: '#validZipCode#'
when it should be #validZipCode# or something like that.
Yeah, an nvarchar(5) with a '81416' in the WHERE clause should work just
fine! Glad you've found a working path.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion
@Matthew,
Good call on the from=1 to=0 ... you're right that it wouldn't execute
at all ... hm
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Sounds like it may just be trying to load the entire 187 MB into memory and
choking on that? Perhaps overall memory usage is the real issue and the
OutOfBounds message is only a false report of a problem related to empty
memory spaces. Good luck debugging that!
Ah, Leigh may be on to it:
If the XML is blank or even if just the 'country' element is empty, than 0 is
still 0, but 0 can't be determined, since 'cities' wouldn't even exist in the
arrayLen(stcXml.country.cities.xmlChildren) test is 'country' is empty. That
would be why your new first test
But before you can use CFLOOP the file had to be read into memory ...
something had to be there for CFLOOP to take action *on* ...
Matthew Reinbold wrote:
Sounds like it may just be trying to load the entire 187 MB into memory
No. My initial approach was to attempt to load the entire
Once you have a list, you can do the following directly in the database
clause:
WHERE zipCode IN ( cfqueryparam cf_sql_type=cf_sql_varchar
value=#zipList# list=true / )
~|
Want to reach the ColdFusion community with
How about something like this (untested):
cfset crlf = chr(13) chr(10) /
cfset lineArray = reMatch(crlf, myFile) /
cfif len(trim(lineArray[26]))
cfset invoiceNumber = trim(lineArray[26]) /
cfelse
cfset invoiceNumber = trim(lineArray[27]) /
/cfif
The variable 'invoiceNumber' should now hold
Damo,
Did you try the attempt I outlined above (reproduced here)? You've got to get
the lines into an array first, then you should be able to refer to them by [26]
or [27], as Peter and I pointed out.
How about something like this (untested):
cfset crlf = chr(13) chr(10) /
cfset lineArray
you don't need to use createODBCDateTime() with CFQUERYPARAM. just
cfqueryparam value=#now()# cfsqltype=CF_SQL_TIMESTAMP
that should do it
~|
Want to reach the ColdFusion community with something they want? Let them know
Agree with Alan here. If you need ancient handwritten docs to be databased
and/or search-ready, I would recommend finding a couple college types to do
some data entry for you at $10 / hour and get it done that way. OCR can't pick
up the possible variations among various handwriting forms.
Just saw this on the wire yesterday:
http://www.labnol.org/internet/perform-ocr-with-google-docs/10059/
Don't know any more about it than that article, but maybe it's helpful.
~|
Want to reach the ColdFusion community with
The error means that InvoiceTemplateType_Key is a column in both tables, so
you have to let the database know which one you actually want. Use your
table aliases:
cfquery name=qgetcreditnotetemplate datasource=#request.dsn#
SELECT
Richard,
Let me see your entire CFSELECT statement and we should be able to figure
out how to get the empty First Option to work for you. It is entirely
possible to do what you're trying to do.
~|
Want to reach the
Note the initial empty option. Also, note that you only need 1 set of
enclosing cfoutput tags.
cfset lookupOptionsArray = listtoarray(Blood,DNA,Other) /
cfselect name=sampleType size=1 multiple=no style=width:200px
required=yes message=Please select a Sample Type to continue.
option
Seems like it. Do you have any custom onSubmit stuff in JS that might be
interfering with the CFFORM processing?
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion
Or look into an AIR app with Flash and the embedded Derby database? AIR
will help you handle the sync from local to server.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of
Have had really good luck with Coyote Point load balance hardware. Set up
2 (or more, we had 5) servers running the same apps and then the LB in
front to guide traffic. We used to use client vars (instead of session
vars) to manage user-to-app connections that were seamless even across
Go to the documentation for the fingerprint device, then, to determine what
the file format is. There are a number of formats that browsers can't
handle (not CF, but the browsers themselves), such as progressive JPEG and
CMYK JPEG. If it's one of those, then you may need a 3rd party
That path works fine for me, output with cfdump
var=#xmlParse(cfhttp.fileContent)# /
Looks like the same content entries I get if I just point my browser
directly to http://news.google.com/?q=hipposoutput=rss
Can your web server resolve the DNS for news.google.com?
http://en.wikipedia.org/wiki/ISO_3166-1
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
Totally agree with Cameron on this. One of the great benefits of version
control is that you can continue to monitor development changes while still
only pushing updates to production when the whole set of changes is ready
to go. I may have a set of changes that takes several days to code,
If you are on CF8+, then my understanding is that locking READ functions is
no longer required. If you're still on CFMX 7, then, yes, cfif
arrayLen(session.customer.custerrors) is a READ function and should be
locked.
Or was it is CFMX 7 that made the READ lock less important?
Thanks for the clarification, Charlie. Something in the back of my mind
was hollering CF7 at the end of that last post, which is what made me
post that last caveat. Your point about the race conditions is the key,
definitely. In most of my apps, the chance of a race condition within the
On CF8, following Charlie's response earlier, you do NOT need a READ lock,
unless you think there could be race conditions (a pending Ajax call that
writes the var you're trying to read, for example). If you DO need to
lock, then, yes, the lock would go *outside* of the CFIF statement, since
+1 for Visual SVN Server. Took our network admin about 10 minutes to
install it, and the updates have been just as painless.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of
Just a quick thought: If, for example, you are building reusable,
singleton components (sorry for the OO buzzwords, but it is descriptive
terminology), then you can load those CFCs into Application scope and have
them exist in memory only once but still be used across all requests in the
like starting your microwave on fire to cook your supper over it
That is a wonderfully expressive metaphor (and accurate to the example,
too!)
~|
Want to reach the ColdFusion community with something they want? Let them
Am not familiar with Mura's setup, but my guess is that a baseURL or
something is being defined somewhere that is causing trouble for the
relative paths to player and/or video source files.
Glad you got it working, though!
IIRC, by the time onSessionEnd() is triggered, the session struct has
already been cleared.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
Hmmm, that works for me day and day out, regardless of whether mime
types have been set, as far as I can recall. Possible issues I can
think of would be bad path somewhere (should be relative to the template
locatoin):
* make sure that the script reference is properly pointing to the
Get a copy of swfobject.js from Google Code
(http://code.google.com/p/swfobject/) and then get a copy of
mediaplayer.swf (can be free, depending:
http://www.longtailvideo.com/players/jw-flv-player/).
Put this in the head:
script type=text/javascript src=js/swfobject.js/script
Then put this
Yeah, just give each DIV a unique ID, each video gets its own script
block, and then make sure that each so.write() method references its
matching DIV's ID, and you'll be good to go.
~|
Want to reach the ColdFusion community
What's the error?
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325942
+1 @Dominic
I gotta believe that working with a published and documented API is, by
definition, the LEAST messy option out there. If YouTube gives you exactly
what you need to get to where you want to be with a few lines of JS, I would
recommend doing that!
currentRecord is a property of a query, not a query itself and you don't need
it to loop over a query = use the cfoutput syntax to loop over your query:
cfoutput query=myQuery
#item_name#br /
/cfoutput
~|
Want to reach the
Not viable at all. If the backend is SQL Server, though, you could the
other way around: host the SQL database with a data provider and have the
ACT! client connect over ODBC.
~|
Want to reach the ColdFusion community
Or if you want a 'real' number, if you're more comfortable with that,
then just divide by 100:
cfset myNum = 20
cfset newNum = myNum / 100
cfoutput#newNum#/cfoutput
~|
Want to reach the ColdFusion community with something
My guess is that they're staging data calls and still routing through their
API objects to handle authentication / validation and all the other
business logic they have in place in their API model.
~|
Want to reach the
Depends on the web service, I would guess. Does its API allow you to do a
search that pulls back all inventory, across the various room types? Then
you could iterate over a single collection within the room type loop on
your server, instead of having to make the round-trip to their server
Good call on the parens. I had those in the original since I had ripped
from code that did use the /1 element later on. Also, you could use
#reReplaceNoCase()# as an alternative to [aA] ... but I like the [aA]
better, for no particular reason.
Try this:
cfset ad = reReplace(form.addesc, (/?a[^]*), , all) /
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
You don't really need the CFIF test, since CFOUTPUT will only render if
there are records. Simplify like the example below and see if it still
gives you trouble. If it does, then check that the add_option() method
isn't erroring ...
cfoutput query=getOptions
cfset
Actually, I run SQL 2005 Express on my Vista box at home for dev work, and it's
actually been fine. SQL Express has its own problems (what do you mean I can't
move data with it??), but that's not a Vista issue.
~|
Want to
Looks like it's still Vista SP1, Home Premium Edition.
No clue what version of the Installer is in place. There are no entries
in those keys that are specific to the installer itself, at least not on
my OS.
~|
Want to reach
If your users have to login to the application using NTFS authorization,
such as if you disable Anonymous access in IIS, then CF will have access
to the user's network credentials and you could pass those into the
query calls:
cfquery name=getMyStuff datasource=mySqlDatasource
I've not seen anything in a grid like that, and not sure what you actually
are trying to do, but if you're looking for geocoded visualization at a
level more granular than just Zip, I highly recommend looking at Universal
Mind's SpatialKey product. It will map by Zip or all the way down to
Completely acceptable to leave out the CFELSE if there is no alternative
action that needs to be taken.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
listVar = left(repeatString(VarChar,, arrayLen(arrayVar)), ((8 *
arrayLen(arrayVar)) - 1));
that just creates a list of VarChar,VarChar,VarChar, based on the
arrayLen() and then removes the final ,.
~|
Want to reach the
Good call, Barney ... forgot all about the removeChars() function ...
haven't used that one in years. Good reminder!
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion
he's not looking for the array element values ... he wants the actual
string 'VarChar' once for each element.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing
Recent blog post about colorizing CFB was linked from the CFB blog. Looks
like his notes would allow you to colorize any tag the way you wanted.
Haven't played with it myself yet.
http://sandeepp.org/blog/?p=84
~|
Want
Try putting your CFTRY / CFCATCH around the outside of the CFTRANSACTION
... the error handler is not triggering your roll-back, I would guess.
cftry
!---//Starting Transaction
-
cftransaction
!---//QUERY1 Insert
Glad to help!
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325038
try / catch is still the right way to capture errors, but if it's inside
the transaction, then the TR won't fire.
if this isn't working, though, then I gotta question whether Access
supports transaction locking at all? It's been years since I used it, so I
can't vouch one way or the other
Don't put ' marks around CFQUERYPARAM ... it already handles that for you.
Also, you were missing pound signs around several of the params.
INSERT INTO dbo.Businesses (
CountyID,
CityID,
CategoryID,
SubCatID,
SubCat2ID,
BusinessName,
Address,
Zip,
cfswitch / cfcase is the way to go ... except that it won't do a
CONTAINS for you, only a string or list element match. That being said,
if you can do a string match (instead of a partial string match), then a
single cfswitch has better performance than 30 cfif tests ...
Your example shows the same input for decrypt as you used for encrypt ...
hopefully that was just a typo, otherwise it's probably your issue.
(decrypt)
decrypt(FORM.password,request.seed,request.algorithm,request.encoding)
In other words, I would expect something more like this:
encPwd =
Just because I can't help myself, you may find the whole thing more readable,
and easier to maintain with a CFSWITCH statement in place of all those ELSE's.
Also probably more performant with only parsing the string once or twice per
loop.
cfoutput query=Recordset1
cfset route =
I think you want it this way, using a CASE statement for the leadmgr
column. I also moved all your subselects into left joins, which should
give a bit better performance.
cfquery datasource=askseaton name=getOffices result=varibles
select
s.address + ' ' + s.address2 + ' ' + s.address3 +
Change type to url, I believe.
cfhttpparam name=address type=url value=00353
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
Try it without 'form.' in the filefield:
cffile action = upload
filefield = embarkFile
destination = #application.physpath#data\
nameconflict = overwrite
accept = text/plain
attributes = Normal /
Assuming
Not a surprise, really. The fileField tells CF to look for that variable
name in the FORM scope, so that if it was a custom tag, for instance, CF
would try this: form[attributes.filefield]. form[form.filefield] would in
invalid in that case ...
I have long been in the habit of using EQ and NEQ (and now moving to == and !=)
for numbers in all cases, since there is no such thing as 'sort of equivalent',
like there is with strings ('foo IS FOO' etc). For strings I use IS, unless
case is important, and then I use CompareNoCase().
Lose the single quotes around the CFQUERYPARAM ... it already handles that
for you:
UPDATE dbo.Courses
SET CourseName = '#Trim(form.coursename)#',
CourseDesc = cfqueryPARAM value=#form.coursedesc#
CFSQLType=CF_SQL_longvarchar /,
Cost = #form.cost#,
MaxStudents =
They're (mostly) only replacing files down deep in the fckeditor's
filemanagement folder, so it's not as scary as it sounds.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of
Hmmm ... do you get a record for every language group if you CFDUMP that
query or if you run it directly on the DB server?
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of
LOL, I know that feeling. With that LEFT JOIN, though, you should see
records even where there are none in tbl_demographics ... odd.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the
I think you need an outside table that has just your 4 language_groups
in it, and then LEFT OUTER JOIN to ensure you get at least one record
for each language, with the COUNT()s that can be zero.
SELECT tbl_langs.language_group, Count(tbl_demographics.contact_id) AS
CountOfcontact_id,
201 - 300 of 513 matches
Mail list logo