However the LoadFromSQLServer method is no longer part of the PackageClass
in Yukon it is insead a part of the ApplicationClass which has no execute
method.
I cannot find any code samples on how to load a yukon package assign
variables and execute the package from VS 2005 beta1.
Thanks in advance to anyone who can help with this
Dim a As Application = New Application()
Dim events As IDTSEvents
' Method 1: Load from the file system
Dim p As Package = a.LoadPackage("c:\foo.dtsx", events)
' Method 2: load from SQL server
Dim p2 As Package = a.LoadFromSqlServer("userName", "serverName", "serverUserName", "ServerPassword", events)
' Method 3: Load from the service
Dim p3 As Package = a.LoadFromDtsServer("packagePath","serverName", events)
' Method 4: Load from an xml document
Dim p4 As Package = New Package()
Dim xmldoc As XmlDocument = New XmlDocument()
xmldoc.Load("c:\package.dtsx")
p4.LoadFromXML(xmldoc.OuterXml, events)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com
"jimd" <ji...@discussions.microsoft.com> wrote in message news:BA8B0E8D-4BE6-472E...@microsoft.com...
Dim a As Application = New Application()
Dim events As IDTSEvents
' Method 1: Load from the file system
Dim p As Package = a.LoadPackage("c:\foo.dtsx", events)
' Method 2: load from SQL server
Dim p2 As Package = a.LoadFromSqlServer("userName", "serverName", "serverUserName", "ServerPassword", events)
' Method 3: Load from the service
Dim p3 As Package = a.LoadFromDtsServer("packagePath","serverName", events)
' Method 4: Load from an xml document
Dim p4 As Package = New Package()
Dim xmldoc As XmlDocument = New XmlDocument()
xmldoc.Load("c:\package.dtsx")
p4.LoadFromXML(xmldoc.OuterXml, events)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com
"jimd" <ji...@discussions.microsoft.com> wrote in message news:BA8B0E8D-4BE6-472E...@microsoft.com...
I am confused why there isn't isn't a LoadFromSQLServer method on the
Package Class or a way to transfer the Package information from Application()
to Package()
thanks again for any help
The object model is basically a new object model, so you now use the
application to load a package. You use the package class to store that
package, as loaded via the application, so why does there need to be a
load method on the package class?
Yes it is all new, and a bit of learning curve, but is there actually
something missing, or something that you cannot do?
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
thanks again for the replies
Package test = new Package();
IDTSEvents testagain = null;
Microsoft.SqlServer.Dts.Runtime.Application myapp = new
Microsoft.SqlServer.Dts.Runtime.Application();
test = myapp.LoadFromSqlServer("DTS_TEST", "myServer", null, null, testagain);
test.Execute();
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/