Solved

DTSPackage  LoadFromSQLServer

Posted on 2006-07-13
5
800 Views
Last Modified: 2008-01-09
I have use vb code before and worked fine.

 Const PackageFileName = "myfile.dts"
        Dim oDTSPackage
        oDTSPackage = CreateObject("DTS.Package")
        oDTSPackage.LoadFromStorageFile(PackageFileName, "")
        oDTSPackage.Execute()
        oDTSPackage = Nothing

When I run this code with in vb.Net I'm not getting any error and works fine w/developer PC.
But when I ran same application from other PC, I get no error but Package did not run.

any idea

XRoK
0
Comment
Question by:xrok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Shakti109
ID: 17103918

I'm assuming this DTS pacakge is "real" and connects to an instance of SQL server through some means and then does some work.

If you are using a mapped DSN on your development machine and the DTS pacakge is referencing that connection, then it probably does not exist on the target machine.

How is the DTS interacting with the server (as in how does it connect)?
0
 
LVL 3

Author Comment

by:xrok
ID: 17104057

I did not create a connection between PC and Server using DSN
vb.Net program has .dll file to connect to Server for application to access server.
I guess that is one I'm missing.... for DTS package.
I was not getting a error like Access Denied or anything..

Advise.
XRoK
0
 
LVL 15

Expert Comment

by:Raisor
ID: 17104337
Hi,

Seems to be the very old "SQL-Server-Create-A-Share-To-Target-First" problem ... meaning, create a network share to the targeted SQL Server ... and try again ... ;-)


Best regards,
Raisor
0
 
LVL 8

Accepted Solution

by:
Shakti109 earned 400 total points
ID: 17104860

If you are using another .DLL that contains functions/methods/etc to connect up to the SQL server for the DTS pacakge, and it is not on the target machine, then it will definately not work.

You may not be getting an error due to the lack of error trapping in the DTS package.

As far as the program is concerned, it told the DTS to "execute" and the DTS did, but couldnt do anything (and didnt have the logic to pass an error back), and even if it could, you are'nt asking for anything back : oDTSPackage.Execute().
If that line read something like : oDTSSuccessCode = oDTSPackage.Execute() (and the DTS pacakge had knowledge/methods to pass it's status back) then you might get an error.

0
 
LVL 3

Author Comment

by:xrok
ID: 17105012
Thank You open my head

Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question