Solved

DTSPackage  LoadFromSQLServer

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now