CF 4.5 does not support UDF



"Success is a journey, not a destination!!"



Doug Brown
----- Original Message -----
From: "lmarcus" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, April 14, 2002 9:35 PM
Subject: How do you call a cfscript udf function and pass a query to it?


> The error is that it doesnt know that CallQuery Exists. This is done in CF
> 4.5.
>
> Thanks
>
> L Marcus
>
> <cfquery name="LarryRec" datasource="db2" maxrows=100 dbtype="ODBC" debug>
> SELECT lastname, address FROM larry4
> </cfquery>
>
> <cfset temp= CallQuery("LarryRec", "cyan", "magenta")>
>
> <cfscript>
>
> function CallQuery (LarryRec,color1,color2) {
>
>    // Get the names of the columns
>    thecols=evaluate("LarryRec.columnlist");
>
>             // Start outputting the table
>    WriteOutput ("<table><tr>");
>       // Table column headers
>    for(i=1;i lte listlen(thecols);i=i+1)
>       WriteOutput("<td><b>#listgetat(thecols,i)#</b></td>");
>    WriteOutput("</tr>");
>
>    // Table column values
>    for(i=1;i lte evaluate('LarryRec.recordcount');i=i+1)
>    {
>       WriteOutput("<tr bgcolor=");
>
>       // Set the background color values
>       if (i mod 2) WriteOutput("'#color1#'>");
>       else WriteOutput("'#color2#'>");
>       for(j=1;j lte listlen(thecols); j=j+1)
>          WriteOutput("<td>
>
> #evaluate('LarryRec.#listgetat(thecols,j)#[#i#]')#</td>");
>       WriteOutput("</tr>");
>    }
>    WriteOutput("</table>");
>    return "";
>
> </cfscript>
>
>
>
> Email: [EMAIL PROTECTED]
>
>
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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