Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jbphoenix
Yak Posting Veteran
68 Posts |
Posted - 2009-03-06 : 12:58:34
|
I'm trying to run a dts package from an access form. Here is the code I have but i'm getting an error.[CODE]Dim dtsPackage As New DTS.PackagedtsPackage.LoadFromStorageFile "C:\POS.dtsx", ""dtsPackage.Execute[/CODE]Run-Time error -2147220220 (80040504) The Specified file is not a Package Storage File. |
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2009-03-06 : 14:03:17
|
You're trying to use dtsPackage.LoadFromStorage. I believe you would need to use dtsPackage.LoadFromSQLServerMike"oh, that monkey is going to pay" |
 |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2009-03-06 : 15:15:09
|
This is very interesting. LoadFromStorageFile is for DTS packages, it will not work for SSIS packages. For SSIS packages you haev to use the Microsoft_SqlServer_ManagerDTS.dll reference. But you can't just use it out of the box. As the first link here shows "You cannot reference a managed assembly from a COM application without first generating a COM callable wrapper".http://www.mydatabasesupport.com/forums/ms-sqlserver/221898-ssis-package-using-vba.htmlThis link shows you how to generate a COM callable wrapper.http://msdn.microsoft.com/en-us/library/hfzzah2c(VS.80).aspxor you could migrate to C# :) |
 |
|
|
|
|