Using transient connections

Transient connections last only as long as the tag that uses them takes to complete processing. To create a transient connection, you specify the connection directly in your action tag (such as cfexchangetask) by using the same attributes as you do in the cfexchangeconnection tag (except for the connection name).

The following example uses a transient connection to create a single task:

<!--- Create a structure with the task fields. ---> 
<cfscript> 
    stask = StructNew(); 
    stask.Priority = "high"; 
    stask.Status = "Not_Started"; 
    stask.DueDate = "3:00 PM 09/14/2007"; 
    stask.Subject = "My New Task"; 
    stask.PercentCompleted = 0; 
    Message = "Do this NOW!"; 
</cfscript>     
 
<!--- Create the task by using a transient connection. ---> 
<cfexchangetask action = "create"  
    username = "#user1#" 
    password = "#password1#" 
    server = "#exchangeServerIP#" 
    task = "#stask#" 
    result = "theUID"> 
     
<!--- Display the UID to confirm that the action completed. ---> 
<cfdump var = "#theUID#">