Importing Validation

  • 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":)

  • 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":)

  • just out of curiosity, which version has got this XP, i cant see this on SQL 2005 😀

  • Found it on SQL 2000

    "We never plan to Fail, We just fail to plan":)

  • 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.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • 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