Re: request timeout

2007-04-30 Thread Sinuy L
yes guys. it's the XML file with NRows of data.
Dave, how and where to get 'wget'?


Cheers, Sinuy
-


 does anyone know how to DYNAMICALLY extend the timeout in 
 CFSETTNG for a long data carry by using CFHTTP? say, it takes 
 10min - or up to 90min sometime.

You can use the TIMEOUT attribute of CFHTTP to override the normal timeout
of a CFHTTP request, but you will also need to override the timeout of your
page itself using CFSETTING.

But honestly, if it takes ninety minutes to fetch something using CFHTTP,
you probably shouldn't do that. Use something else (like wget) to fetch
files for you if they take that long.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276539
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


request timeout

2007-04-29 Thread Sinuy L
does anyone know how to DYNAMICALLY extend the timeout in CFSETTNG for a long 
data carry by using CFHTTP? say, it takes 10min - or up to 90min sometime.

Sinuy
-

~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276513
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cftry inside of cftransaction ??

2006-11-08 Thread Sinuy L
hi
i'm still newbie to xml thingy, do u think i can use cftransaction and cftry 
into my code below?
cfflush interval=10
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
titleXML to Database/title
/head
body
!---parse XML via http---
cfhttp url=http://localhost:8500/templatemonsters-WEBAPI/01NOV-02NOV.xml; 
method=GET resolveurl=Yes throwOnError=Yes/
cfset Templates = XmlParse(CFHTTP.FileContent)
!--- The root element of this XML Object ---
!--- is the templates element in the XML code---
CFSET templatesRoot = Templates.XmlRoot
!--- Let's grab the company element's name attribute
CFSET templatesCompany = templatesRoot.XmlAttributes[company] ---
!--- How many immediate children of company are there? ---
CFSET templatesTotal = ArrayLen(templatesRoot.XmlChildren)

!---cfoutputp#templatesCompany#/pp#templatesTotal#/p/cfoutput---

CFOUTPUT
!--- Loop through each of the location elements ---
CFLOOP FROM=1 TO=#templatesTotal# INDEX=i
!--- Grab values from the XML document ---
CFSET thisID = templatesRoot.XmlChildren[i]
!---CFSET id = thisID.XmlAttributes[id]---

cfif thisID[state].xmlText neq 2
and (thisID[template_type][type_id].xmlText eq 1
or thisID[template_type][type_id].xmlText eq 2 
or thisID[template_type][type_id].xmlText eq 3
or thisID[template_type][type_id].xmlText eq 9
or thisID[template_type][type_id].xmlText eq 10)
h3#thisID[state]#/h3
!---xml to database - begin---
ptt
emstrong#thisID[id].xmlText#/strong/embr /
Price#thisID[price].xmlText#
(Unique#thisID[exc_price].xmlText#)br /
Type #thisID[template_type][type_id].xmlText#br /

cfif not #structIsEmpty(thisID[screenshots_list])#
cfset findDIR = 
getDirectoryFromPath(thisID[screenshots_list][screenshot][1][uri].xmlText)
  
Directory 
#ReplaceList(findDIR,http://,images.templatemonster.com/screenshots/,/;, 
)#br /

cfloop
from=1
to=#ArrayLen(thisID.screenshots_list.screenshot)#
index=the_screenshot_list

cfset 
screenshotToFind = 

getFileFromPath(thisID[screenshots_list][screenshot][the_screenshot_list][uri].xmlText)
cfif
screenshotToFind contains 
#thisID[id].xmlText#-m.jpg or
screenshotToFind contains 
#thisID[id].xmlText#-b.jpg
#getFileFromPath(

thisID[screenshots_list][screenshot][the_screenshot_list][uri].xmlText
)#,
/cfif

/cfloop
cfelse
Null
/cfif
/tt/p
!---xml to database - end---
/cfif


/CFLOOP
/CFOUTPUT



/body
/html







Figured someone would know and answer quicker than me testing this. 

Can you wrap a query with cftry inside a cftransaction? 

Thanks,
Will

I do this all the time in my CFCs...

cftransaction
cftry
cfquery
!--- Query here ---
/cfquery
cfquery
!--- Another query here ---
/cfquery
cfcatch type=database
cftransaction action=rollback /
cfreturn false /
/cfcatch

!--- If no database errors caught, commit transaction ---
cftransaction action=commit /
/cftransaction

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259726
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: MS Access xml file and CF...

2006-11-02 Thread Sinuy L
Hello,
i have a 60MB xml and it has up to 5000++ xmlChildren.
should i cfhttp it to fetch the xml data then, cfloop it 5000 times to 
insert/update into DB? Besides, it is an Access DB and i will only import some 
specific data instead of all data. 

any suggestion of how to do it smoothly? 




Hello,

I have a user with an access database that they want to export an xml
file out of, and through cf, upload the file and have the contents
inserted into the sql server db table. No problem, I know how to do
this. The problem is that the xml elements are not consistent. For
example, if the contact field is null in one of the records, then the
xml file doesn't generate Contact/Contact. It drops it altogether.
So, how can this be cared for in CF?

TIA,

- Gary

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258834
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4