Skip to main content
Inspiring
February 17, 2010
Question

Running in this order

  • February 17, 2010
  • 2 replies
  • 413 views

I need to run several stored procedures in certain order

If I write them this way will they ran in this exact order? stored proc 1 is ran first then 2,3 and finally 4?

<cfstoredproc procedure="str_Proc_1" datasource="ABC">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@id" value="#session.id#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@fn" value="#url.fn#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@ln" value="#url.ln#">
</cfstoredproc>
<cfstoredproc procedure="str_Proc_2" datasource="ABC">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value1" value="#somevalue#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value1a" value="#somevalue#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value1b" value="#somevalue#">
</cfstoredproc>
<cfstoredproc procedure="str_Proc_3" datasource="ABC">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value2" value="#somevalue#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value2a" value="#somevalue#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value2b" value="#somevalue#">
</cfstoredproc>
<cfstoredproc procedure="str_Proc_4" datasource="ABC">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value3" value="#somevalue#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value3a" value="#somevalue#">
    <cfprocparam type="in"  cfsqltype="cf_sql_varchar" dbvarname="@value3b" value="#somevalue#">
</cfstoredproc>
This topic has been closed for replies.

2 replies

Inspiring
February 21, 2010

I need to run several stored procedures in certain order

If I write them this way will they ran in this exact order? stored proc 1 is ran first then 2,3 and finally 4?

Yeah.  Code is executed sequentially from the first instruction onwards.  You write the code in the order you want it to execute.

This seems like too obvious an answer, so I suspect there's some sort of disconnect going on and I'm misunderstanding what it is you're asking..?

--

Adam

Inspiring
February 17, 2010

What happened when you ran that code?