Are you sure that SQL DMO is correctly installed? What is your version of SQL-DMO? Search for LoadFromSQLServer at
http://support.microsoft.com/default.aspx?scid=fh;EN-US;KBHOWTO>I have try the code from the following example replacing the variable strings with correct values but it still doesn't work.
>
><<
>Sub Command1_Click()
> Dim dtsp As New DTS.Package
> dtsp.LoadFromSQLServer _
> ServerName:="MyServer", _
> ServerUserName:="MyUserID", _
> ServerPassword:="MyPassword", _
> PackageName:="DTSDemo"
> dtsp.Execute
>End Sub
>>>
>
>Here is the error message that I get:
>Method 'loadFromSQLServer' of object '_Package2' failed.
>
>I have seen that there really is an DTS.Package2 object so I have try with this object but I still come up with the same error code. What's wrong?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com