Hi

I have a situation where I get 6 different excel spreadsheets  

uploaded to a website - then have to import them into one database  

(I do not have any control over this). The spreadsheets have the  

same fields.

I have an excel DSN called "update"

So I upload the 6 files, loop over each one and if it's file name  

(less the extension) is in a table (tbl_category) I rename it to  

the dsn file name, then import into the main database.

Then I delete that file get the next one and so on.

However I get an error when deleting each renamed file ("Error  

processing CFFILE Unable to delete the file  

'C:\InetPub\wwwroot\nmm\DropBox\update.xls.' The process cannot  

access the file because it is being used by another process.  

(error 32)")



I have put in

<!--- Disable connections to remove read-only lock on the file  

--->

<CFSET CFUSION_DISABLE_DBCONNECTIONS("#request.health_update_dsn#",  

1)> 



 <!--- Enable connections if they've been disabled --->

<CFSET CFUSION_DISABLE_DBCONNECTIONS("#request.health_update_dsn#",  

0)> 



but this doesn't seem to help.



Does anyone have any clues please.

BTW if set things up so each loop is done "manually" ie go to first  

file, do insert stuff, click to do next file it works fine.



MTIA

Seamus





Seamus Campbell   Boldacious WebDesign

http://www.boldacious.com   ~~~~   [EMAIL PROTECTED]

ph 02 6297 4883   fax  02 6297 8464   mob 0410 609 267





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.


                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89
70.4
                                

Reply via email to