dbTalk Databases Forums  

Retrieve transformation error code in VBScript

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Retrieve transformation error code in VBScript in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wei Chen
 
Posts: n/a

Default Retrieve transformation error code in VBScript - 10-20-2006 , 10:16 AM






I have a MultiPhase data pump. I'd like to log the official error code
and descritpion when something goes wrong, but don't know where to
begin. Can someone give me some pointer?

Here is an excerpt of my code. I'm telling it to skip the error row and
continue processing.

Function InsertFailureMain()

If Len(DTSGlobalVariables("ErrorLines").Value) = 0 Then
DTSGlobalVariables("ErrorLines").Value =
DTSGlobalVariables("CurrentLine").Value & "|"
Else
DTSGlobalVariables("ErrorLines").Value =
DTSGlobalVariables("ErrorLines").Value &
DTSGlobalVariables("CurrentLine").Value & "|"
End If
logFile.WriteLine "Error: Insert failure at data file line " &
DTSGlobalVariables("CurrentLine").Value

InsertFailureMain = DTSTransformstat_SkipInsert
InsertFailureMain = DTSTransformstat_Ok

End Function


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.