Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfhttp

Status
Not open for further replies.

yuchieh

MIS
Jul 21, 2000
178
US
have the following code --

<cfloop list=&quot;#form.disciplineCode#&quot; index=&quot;discode&quot;>
<cfoutput>

<cfhttp url=&quot; timeout=&quot;30&quot; method=&quot;POST&quot;>
<cfhttpparam name=&quot;discipCode&quot; type=&quot;URL&quot; value=&quot;#discode#&quot;>
</cfhttp>

<cffile action=&quot;WRITE&quot; file=&quot;#GetDirectoryFromPath(GetCurrentTemplatePath())#testExcel#discode#.xls&quot; output=&quot;#cfhttp.filecontent#&quot; attributes=&quot;Normal&quot; addnewline=&quot;Yes&quot;></cffile>

<CFDUMP var=&quot;#cfhttp.FileContent#&quot;>

Open &quot;testExcel#discode#.xls&quot; and see the results <p>

</cfoutput>
</cfloop>

It's to populate 15 Excel files. The first file is created fine. From file2 to 15 all &quot;connection failure&quot;.

Please help!!
 
You might add something like...

<cfloop from=&quot;1&quot; to=&quot;7500&quot; index=&quot;i&quot;> </cfloop> after the http to slow it down, possibly simultaneous connections are throwing it...

Also I don't know how or why but you have a ; after your url attribute for cfhttp.

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
I use list loop, can't add <from=&quot;1&quot; to=&quot;7500&quot;>.

the &quot;;&quot; after the url was a typo when posting.

Thanks
 
I mean you should embed the above loop, it will of course slow the processing of the page but at least you might have something.

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
I see. Could you show me where exactly I should put the loop?

Thanks
 
<cfloop list=&quot;#form.disciplineCode#&quot; index=&quot;discode&quot;>
<cfoutput>

<cfhttp url=&quot; timeout=&quot;30&quot; method=&quot;POST&quot;>
<cfhttpparam name=&quot;discipCode&quot; type=&quot;URL&quot; value=&quot;#discode#&quot;>
</cfhttp>

....right here...

<cffile action=&quot;WRITE&quot; file=&quot;#GetDirectoryFromPath(GetCurrentTemplatePath())#testExcel#discode#.xls&quot; output=&quot;#cfhttp.filecontent#&quot; attributes=&quot;Normal&quot; addnewline=&quot;Yes&quot;></cffile>

<CFDUMP var=&quot;#cfhttp.FileContent#&quot;>

Open &quot;testExcel#discode#.xls&quot; and see the results <p>

</cfoutput>
</cfloop>

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top