February 22, 2007 at 4:54 am
Hi
I can check if a file exists in DTS, but how can I check if it is in use before I truncate a table and try to import the file?
I often have occasions where the file I am trying to import is still being written by our ERP system
this means that I truncate the table and am then unable to import data into it.
SS2K
TIA
Paul
February 26, 2007 at 8:00 am
This was removed by the editor as SPAM
February 27, 2007 at 2:40 am
does your erp system export the data using DTS, or can you customise your erp to create an additional file after it has created the one you want to import?
are you using sql 2005. if so then you could consider using a .net assembly as a function which returns True if being used and False if not.
goto to this site
http://dotnet.org.za/codingsanity/archive/2007/02/09/checking-if-a-file-is-locked.aspx
or
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1253021&SiteID=1
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply