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)
 Exception Handling

Author  Topic 

vk59
Starting Member

38 Posts

Posted - 2005-05-19 : 05:44:13
I have written an VB Application to migrate data from DbaseIV to SQL Server using DTS. For migration, I am using DTS generated VB script.
Is there any way to handle errors wherein when step fails to script should return me an error message.

I am able to write log to file using by setting the below property
goPackage.LogFileName = "D:\Migration\log.txt".

My requirement is when a step fails it should it return error through message box

Thanks in advance
vk59

SreenivasBora
Posting Yak Master

164 Posts

Posted - 2005-05-19 : 18:27:26
Yes.

WAY 1:

You can define in DTS itself about "WORKFLOW" Properties.
If SUCCESS then goto next task
If FAIL then send a message to Administrator
If COMPLETION then send a message (from VB/VBSCRIPT) to display Process was completed sucessfully.

========================================================================================

Way 2

Create all DML statement in Stored Procedures and handle all errors with proper ERROR Handling ans store all errors into a table.

With Regards
Sreenivas Reddy B
Go to Top of Page
   

- Advertisement -