I wouldn't expect that the delete or truncate would still be running, 
but if they are, wrapping all of the <cfquery> tags in a <cftransaction> 
might help, or wrapping the delete/truncate in a transaction, then 
calling the insert in a separate <cftransaction>?

HTH,
Carl

On 3/2/2011 9:57 AM, Mallory Woods wrote:
> I am trying to clear all of the data from a table before importing new data.
>
> Example code:
>
> *
>      <cfquery name="qryClear" datasource="datasource">
>          TRUNCATE TABLE tablename
>      </cfquery>
>
>   --->
> <!---
> <cfquery name="qryDelete" datasource="datasource">
>          delete  from tablename
>   </cfquery>
>    --->
>
> <cfquery name="qryInsert" datasource="datasource">
> insert into tablename
>    ......
> </cfquery>*
>
> I have tried to truncate and delete the data. This appears to work fine.
> However, the next set of lines which is supposed to import the data runs but
> no data is imported.
> Could the delete or truncate function still be running when the import is
> taking place? If so, what is the best suggested method to get both of these
> functions to run after
> each other?
>
> Thanks in advance.
>
> Mallory Woods
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342689
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to