Are you speaking specifically to the value of cfquery.executiontime, which
is tied to the "last" query? I can see that value perhaps being wrong.

Yes. The cfquery struct that is available after a <cfquery> block runs seems to be attached to the Variables scope, and not the Request or localized scope. This was determined by experiment, and we are waiting to hear from Macromedia on this. If this is the case, and you use the values returned such as cfquery.executiontime, then there are ramifications such as:


a) CFCs which are persisted will maintain that linkage to cfquery, and so the variable is never garbage-collected

b) CFCs held in shared scopes will encounter race conditions; whereas you can localize the return variable of the query, you cannot localize the cfquery return because you cannot use dot-notation variables in a var clause

c) the workaround seems to be to lock the query block by name, and then transfer the cfquery values to a localized variable using duplicate; each CFC would need to have a single name for use in the cflock, and needs to use it for every <cfquery> block whether or not that block's cfquery values are needed, because even if they aren't needed they can overwrite those that are needed in the shared Variables scope.

--

    Ben Curtis
    WebSciences International
    http://www.websciences.org/
    v: 310 478 6648
    f: 310 235 2067






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to