Solved

DTSPackage  LoadFromSQLServer

Posted on 2006-07-13
5
764 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
Comment Utility

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
Comment Utility

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
Comment Utility
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
Comment Utility

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
Comment Utility
Thank You open my head

Thanks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

11 Experts available now in Live!

Get 1:1 Help Now