VB6 create transformation

  • All,

    I hope it's OK to post this here. Not sure if it's a VB6 or SQL issue.

    I'm trying to add a transform task via VB. The code in VB doesn't show an error but the transform doesn't show up when I view the package design through SQL server.

    My code is as follows:

    oPackage.LoadFromSQLServer (security details removed),DTSSQLStgFlag_Default, , , , "SQLExcel"

    Set tskTask = oPackage.Tasks.New("DTSDataPumpTask")

    Set objDataPump = tskTask.CustomTask

    tskTask.Name = "ExportData1"

    objDataPump.SourceConnectionID = 2

    objDataPump.SourceObjectName = "tabAction"

    objDataPump.DestinationConnectionID = 1

    objDataPump.DestinationObjectName = "tabTest"

    objDataPump.ProgressRowCount = 1000

    objDataPump.MaximumErrorCount = 0

    objDataPump.FetchBufferSize = 1

    objDataPump.UseFastLoad = True

    objDataPump.ExceptionFileColumnDelimiter = "|"

    objDataPump.AllowIdentityInserts = False

    objDataPump.FirstRow = 0

    objDataPump.LastRow = 0

    objDataPump.FastLoadOptions = 2

    'Add task

    oPackage.Tasks.Add tskTask

    'Save the package

    oPackage.SaveToSQLServer (IP and security details removed)

    oPackage.Execute

    VB6

    SQL 2000 SP4

    Thanks

    Andrew

  • The solution was to add a step through the VB6 code. It seems that if you add a transformation through EM it creates the step automatically but not through code.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply