Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Exporting From mutliple table with error handling

Author  Topic 

Yukon2005
Starting Member

8 Posts

Posted - 2006-02-20 : 09:37:14
Hi Peeps,

I recently received a task that I need to develop an export for SQL Server 2000. The criteria is that I need to use DTS, a check should be done to see if data exists in the two tables, if there is data it should be exported to a custom file name. The DTS package should be executed from a stored procedure, if an error occurs the user should be notified (not by email) by a display of some sort. Now, the only things I have done using DTS is to send a mail if a scheduled task fails. So my knowledge of DTS is very limited. If it was my project I would have used bcp, but it's not so...

No I've been playing with the actual package and everything seems to be fine when running it in Enterprise Manager. When I run it from a stored procedure nothing happens the package just keeps on running, even though it should have failed on step 1 cause no records exist.

My current Steps:
1. ActiveX Script (VBScript) - If the records do not exist then display a message box and set the function to "DTSTaskExecResult_Failure"

2. ActiveX Script (VBScript) - If Step on is succesfull then check that the "Destination Folder" for the Destination File Connection Exists. If Not "DTSTaskExecResult_Failure".

3. ActiveX.. -If step 2 succeeds then generate and assign the destination file names.

4. 2 X Data Transformation Tasks - Used to export the data to the relevant file.

Could anybody please guide me as to what I need to do.
   

- Advertisement -