xmlSearch() tip

2011-07-07 Thread Sean Henderson

Having problems performing a subsequent XML search on a array item that looks 
like XML and was produced from a previous XML search? Basic XPath strings 
returning empty arrays?  

Then try removing any xhtml declaration attributes, in paricular from the base 
node, in the array item prior to xmlSearch().  This fixed where I was not 
getting any results back from xmlSearch() for a known XML element even using 
the most basic of XPath criteria. 

The takeaway here is that even though isXML() may return true, that does not 
mean xmlSearch() will work as expected/hoped/described.

Sean


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346136
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SQL query question

2011-02-02 Thread Sean Henderson

With ColdFusion 9, we ended up replacing all the wildcard selects with actual 
column names, among other fortifications.  We did not experience this issue on 
6.1. 





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341821
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SQL Azure and Coldfusion 9

2010-11-30 Thread Sean Henderson

Rather that CF9 and CFQUERY handle it better

To my mind, if CFQUERY does not error out, then the queryname, recordcount and 
column list in all cases should be set, regardless of driver or target database.

For those of us with sprawling apps to maintain (1,000s of .cfm files) and 
where a global edit across such code base is not possible, patching this is 
headache.

>So use isDefined(Variables.queryname) first.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339642
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SQL Azure and Coldfusion 9

2010-11-30 Thread Sean Henderson

>This is actually incredibly easy to deal with this scenario, you just have
>to check for the existence of the query variable first.
>You would normally check the recordcount > 0 anyway so you don't output
>nothing, so it really isn't any more work.

That would be true except when recordcount isn't populated, the query itself 
may not be populated and, depending on why, will error out.

Since isQuery() will error out if the var is unset after CFQUERY, that is not 
very useful either.

 CFQUERY name="myQry" ...   
declare @tmp table (col1 int) -- step 1

insert into @tmp (col1) select 
sub.* from (select 1 as col1 where 1=2) sub -- step 2

select * from @tmp where 1=2 -- step 3
 /CFQUERY
 CFIF isQuery(myQry)
  CFDUMP var="#myQry#"
  CFDUMP var="#myQry.recordCount#"
  CFDUMP var="#myQry.columnlist#"
 /CFIF

This will (still) bomb using MS JDBC 2.0/3.0 drivers against SQL Azure or SQL 
Server 2008 (SQL2K8).  Not so using MS SQL Server (which is actually a MM JDBC 
driver in CF) against SQL2K8.

Sean


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339639
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: REQUEST.cfdumpinited

2010-11-30 Thread Sean Henderson

>I use cfdump in cfmail all the time, and it works fine for me (we're
>on CF9 as well).  Are you sure you're using the HTML format?

I was using HTML format, but it turns out I also have to use cfmailpart to get 
the javascript generated by CFDUMP from showing in the message body.

So now it looks like this:

 CFMAIL to= from= subject= type="HTML"
 CFMAILPART type="text"
  text version here
 /CFMAILPART
 CFMAILPART type="HTML"
  markup version here
  CFDUMP
 /CFMAILPART
 /CFMAIL

Where it used to just look like this:

 CFMAIL to= from= subject= type="HTML"
  markup here
  CFDUMP
 /CFMAIL

Thanks for the help,

Sean


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339638
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: REQUEST.cfdumpinited

2010-11-30 Thread Sean Henderson

>On 11/30/2010 11:23 AM, Sean Henderson wrote:
>> CF9 workaround?
>
>The output format property of CF9 that allows you only output a text 
>version of the cfdump content?

Well, except I need the markup, just not the extra style or javascript.  It 
also appears that CFDUMP generates the style and javascript tags for each time 
it is called.

The real issue here is that CFDUMP used to work properly inside a CFMAIL tag in 
CF6, and now in CF9, it either does not work at all, or spews a bunch of 
unhidden javascript into the body of the email.

Regular (not in CFMAIL) example (angle-brackets removed):

body
cfset foo=queryNew("bar")
cfset dummy=queryAddRow(foo,1)
cfset dummy=querySetCell(foo,"bar","bat")
cfset REQUEST.cfdumpinited=false
cfdump var="#foo#"
cfdump var="#REQUEST#"
/body

Sean



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339633
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


REQUEST.cfdumpinited

2010-11-30 Thread Sean Henderson

In CF9, setting REQUEST.cfdumpinited to true prevents CFDUMP from displaying at 
all, where in CF6 it merely prevented the STYLE and SCRIPT tags from appearing.
CF9 workaround? No mention of cfdumpinited in either of these below:

Home / ColdFusion 9 CFML Reference / Reserved Words and Variables / Custom tag 
variables 

Home / ColdFusion 9 CFML Reference / ColdFusion Tags / Tags d-e / cfdump 

Sean






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339631
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


SQL Azure and Coldfusion 9

2010-11-26 Thread Sean Henderson

FYI, SQL Azure is not part of the support matrix for ColdFusion.

http://www.adobe.com/products/coldfusion/pdfs/cf9_support_matrix_4_ue.pdf

There's an issue with SQL Azure where certain types of queries that when 
returning zero records, will not populate recordcount or set the query variable 
at all.  After contacting Adobe about a patch for this for ColdFusion 9, Adobe 
indicated that SQL Azure is not supported and closed the support ticket.

I have a ticket opon on the Microsoft side, and still trying to identify 
whether it is the JDBC driver itself or something specific with SQL Azure.

For now, if considering SQL Azure, likely not an option for production at this 
time unless willing to write overly defensive code.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339540
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFMail Send Problem

2010-11-09 Thread Sean Henderson

Experiencing the same issue (blank message body) this past week (as of 
11/09/10) as described in this post of 11/12/2003.

No changes to the template(s) calling CFMail - just started sending blank 
message bodies. Spam score says negative 1 (-1) where a score of 3 or more is 
spam, so that's not it.  CF says it left the building fine.  Records in db say 
there was indeed message content.  Thankfully only happening on our test system 
(in office), not in production (co-lo).  Anyone figure this out? Was it an 
ISP/content filtering issue?

Thanks, Sean
stack: CFMX6.1 (j2sdk1.4.2_11), SQL2K Std, Win2K3 Std R2 SP2.

> ... weird problem occurring with an email send out using CFMail 6.1 from
> a SQL2000 db.  Seems that SOME recipients of the message get a blank/empty
> message body (subject line, to and from fields are OK).
> ... doesn't seem to be email client specific 
> Thanks, Mark


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339011
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Migrating from CFMX6.1 to CF9 (Win2K3,SQL2K)

2010-09-17 Thread Sean Henderson

> 1. Anyone have a reason why CGI.path_info would be empty?
It appears CGI.script_name would have been the better var to use all this time. 
Thanks anyways. -Sean 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337183
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Migrating from CFMX6.1 to CF9 (Win2K3,SQL2K)

2010-09-16 Thread Sean Henderson

1. Anyone have a reason why CGI.path_info would be empty?
2. Other gotchas, tips and or headaches?
This is a big version jump and I cannot be the only one to have done it.  
Searching this forum with "CFMX6.1 CF9" and similar didn't yield much. TIA -Sean


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337135
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Now() vs getDate() MsSQL CFMX

2010-05-19 Thread Sean Henderson

>> My assumption is any difference between the two
>> would be the result of the two server's clocks
>> not being in sync.
>
>I concur with that assessment.  If you have access, I'd recommend setting
>the servers to use an NTP time server to keep them in sync with the rest of
>the world.
>
>
>-Justin

Checked the diff between the two servers, and it matches the diff between now() 
and getDate(), so that's it.  Thanks!

-Sean


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333814
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm