Can you pass a file into a UDF? Yes. Basically, anything you can do with a UDF you can 
do with a CFC and that includes passing huge chunks of data into them.
You might want to check out chapter 8 in the developing CF applications 'book' that 
shipped with the server.


> oi people!!
> 
> currently I've got a few scripts that generate stats from an ftp
> server. I've got a couple custom tags that loop some files and
> generate queries based on the contents.
> 
> My question.... after listening to Tim Buntel talk the other nite bout
> cfc's would it be to my advantage to convert the tags into a cfc or
> leave them as a custom tag.... ? The custom tag takes a file passed
> into it....is this possible with cfc's?
> 
> code sample below:
> 
> <cfif  Not fileexists("#Request.StatDir##attributes.datFile#")>
>         <cfexit>
> </cfif>
> <cffile action="READ" file="#Request.StatDir##attributes.datFile#" 
>variable="readFile">
> <cfset  ufile = querynew("iUser,iGroup,ibytes,itag")>
> <cfloop index="i" list="#readFile#" delimiters="#CHR(13)##CHR(10)#">
> <cfscript>
>         i = replacenocase(i,"::",":0:","All");
>         i = listToArray(i,":");
>         queryaddRow(ufile);
>         querySetCell(ufile,"iUser",i[1]);
>         querySetCell(ufile,"iGroup",i[2]);
>         querySetCell(ufile,"ibytes",i[3]);
>         if(i[5] neq 0){
>                 querySetCell(ufile,"iTag",i[5]);
>         }else{
>                 querySetCell(ufile,"iTag","&nbsp;");
>         }
> </cfscript>
> 
> 
> 
> 
> 
> -- 
> Best regards,
> 
> Critter, MMCP
> Certified ColdFusion Developer
>  
> Crit[s2k] - <CF_ChannelOp Network="EFNet" Channel="ColdFusion">
> 
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to