January 20, 2009 at 7:21 am
Hi, Y'all
Q. I created an import Job using DTS, and it works fine, the only issue is when the spreadsheet is empty or excel file is not present, the job abends; that is fine. what I need is a method with in DTS to validate the existance ofthe File itself and then validate the existance of the worksheet.
Any ideas are more then welcome, but please test your response, I am sure that more the just me is reading this thread.
thanks
😉
"We never plan to Fail, We just fail to plan":)
January 21, 2009 at 8:18 am
Guys
All Issues where resolved. here the answer was to use a non documented store procedure called xp_FileExist and catch the reurtn code.
exec xp_fileexit 'c:\tst.txt', @catchcode Output
if the @catchcode = 1
Print ''file has arrived.'
else
Print 'No file is here yet.'
you know the general idea.
thanks:hehe:
"We never plan to Fail, We just fail to plan":)
January 21, 2009 at 9:01 am
just out of curiosity, which version has got this XP, i cant see this on SQL 2005 😀
January 21, 2009 at 9:30 am
Found it on SQL 2000
"We never plan to Fail, We just fail to plan":)
January 21, 2009 at 10:11 am
xp_FileExist and catch the reurtn code.
exec xp_fileexit 'c:\tst.txt', @catchcode Output
Watch the spelling in the exec line it is misspelled. It does exist in my SQL 2005.
January 21, 2009 at 10:16 am
Thanks for the Correction, Please understand I was very busy at the time. thx:w00t:
"We never plan to Fail, We just fail to plan":)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply