Groups | Blog | Home
all groups > sql server dts > december 2003 >

sql server dts : Whats wrong in this vb code?VB newbie pls help...


ajayz90 NO[at]SPAM hotmail.com
12/7/2003 10:33:39 AM
I am trying to load a Package from a repository, my server name has a
funny name but i get this mssage....could someone give a hint where I
am going wrong?


Private Sub Form_Load()
Dim pkg As DTS.Package
pkg.LoadFromRepository "17433136281", "msdb", "sa", "",
"{B3E46B63-FEE6-43CB-849B-8C87510FE4CA}", , "test",
DTSReposFlag_Default
pkg.WriteCompletionStatusToNTEventLog = False
pkg.LogFileName = "c:\dts\error\northwindolapunleashed.txt"
pkg.FailOnError = False
pkg.PackagePriorityClass = DTSPriorityClass_Normal
pkg.MaxConcurrentSteps = 8
pkg.LineageOptions = DTSLineage_AddLineageVariables +
DTSLineage_WriteToReposIfAvailable
pkg.UseTransaction = True
pkg.TransactionIsolationLevel = DTSIsoLevel_ReadCommitted

End Sub

I get the message Object variable with block variable not set.....The
QL server has been checked out by me and I have alsoput the correct Id
fro the package...



Thnaks in anticipation



Sue Hoegemeier
12/8/2003 5:56:35 AM
Same thing as your previous issue - you aren't creating a
package object, you are just declaring it and trying to use
it. Try declaring it using the New keyword:
Dim pkg as New DTS.Package
Alternatively, you can use:
Dim pkg as DTS.Package
Set pkg = New DTS.Package

-Sue

On 7 Dec 2003 10:33:39 -0800, ajayz90@hotmail.com (Ajay
[quoted text, click to view]
AddThis Social Bookmark Button