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
Solved

DTSPackage  LoadFromSQLServer

Posted on 2006-07-13
5
792 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 125
Hide vba in gp 7 104
Auto-indent certain lines in Notepad++ 10 112
Help Required 2 39
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

856 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