<!--- Tag Parameters --->
<CFPARAM NAME="ATTRIBUTES.MovieTitle" TYPE="string">
<CFPARAM NAME="ATTRIBUTES.PitchText" TYPE="string">
<CFPARAM NAME="ATTRIBUTES.RatingID" TYPE="numeric">
<CFPARAM NAME="ATTRIBUTES.AmountBudgeted" TYPE="numeric">
<CFPARAM NAME="ATTRIBUTES.Summary" TYPE="string">
<CFPARAM NAME="ATTRIBUTES.ReturnFilmID" TYPE="variableName">
<CFPARAM NAME="ATTRIBUTES.ReturnStatusCode" TYPE="variableName">


<!--- Execute the FilmInsert stored procedure --->
<CFSTOREDPROC 
  PROCEDURE="InsertFilm" 
  DATASOURCE="owsServer"
  RETURNCODE="Yes">

  <!--- Provide form values to the procedure's input parameters --->  
  <CFPROCPARAM 
    TYPE="In"
    DBVARNAME="@MovieTitle" 
    MAXLENGTH="50" 
    CFSQLTYPE="CF_SQL_VARCHAR"
    VALUE="#ATTRIBUTES.MovieTitle#">
  <CFPROCPARAM 
    TYPE="In"
    DBVARNAME="@PitchText" 
    MAXLENGTH="100" 
    CFSQLTYPE="CF_SQL_VARCHAR"
    VALUE="#ATTRIBUTES.PitchText#">
  <CFPROCPARAM 
    TYPE="In"
    DBVARNAME="@AmountBudgeted" 
    MAXLENGTH="100" 
    CFSQLTYPE="CF_SQL_MONEY"
    VALUE="#ATTRIBUTES.AmountBudgeted#">
  <CFPROCPARAM 
    TYPE="In"
    DBVARNAME="@RatingID" 
    MAXLENGTH="100" 
    CFSQLTYPE="CF_SQL_INTEGER"
    VALUE="#ATTRIBUTES.RatingID#">
  <CFPROCPARAM 
    TYPE="In"
    DBVARNAME="@Summary" 
    CFSQLTYPE="CF_SQL_LONGVARCHAR"
    VALUE="#ATTRIBUTES.Summary#">

  <!--- Capture @NewFilmID output parameter --->
  <!--- Value will be available in CFML variable named #InsertedFilmID# --->
  <CFPROCPARAM 
    TYPE="Out"
    DBVARNAME="@NewFilmID" 
    CFSQLTYPE="CF_SQL_INTEGER"
    VARIABLE="Caller.#ATTRIBUTES.ReturnFilmID#">

</CFSTOREDPROC>

<!--- Remember the status code returned by the stored procedure --->
<CFSET "Caller.#ATTRIBUTES.ReturnStatusCode#" = CFSTOREDPROC.StatusCode>
