Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
General
»
Importing Validation
Importing Validation
Rate Topic
Display Mode
Topic Options
Author
Message
lrosales
lrosales
Posted Tuesday, January 20, 2009 7:21 AM
SSC Journeyman
Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77,
Visits: 399
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":)
Post #639941
lrosales
lrosales
Posted Wednesday, January 21, 2009 8:18 AM
SSC Journeyman
Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77,
Visits: 399
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
"We never plan to Fail, We just fail to plan":)
Post #640775
CrazyMan
CrazyMan
Posted Wednesday, January 21, 2009 9:01 AM
Right there with Babe
Group: General Forum Members
Last Login: Tuesday, September 18, 2012 3:00 PM
Points: 770,
Visits: 1,593
just out of curiosity, which version has got this XP, i cant see this on SQL 2005 :D
Post #640846
lrosales
lrosales
Posted Wednesday, January 21, 2009 9:30 AM
SSC Journeyman
Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77,
Visits: 399
Found it on SQL 2000
"We never plan to Fail, We just fail to plan":)
Post #640880
bitbucket-25253
bitbucket-25253
Posted Wednesday, January 21, 2009 10:11 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 4:00 PM
Points: 5,102,
Visits: 20,205
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
Before posting a performance problem please
read
Post #640929
lrosales
lrosales
Posted Wednesday, January 21, 2009 10:16 AM
SSC Journeyman
Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77,
Visits: 399
Thanks for the Correction, Please understand I was very busy at the time. thx
"We never plan to Fail, We just fail to plan":)
Post #640933
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.