Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DTSPackage  LoadFromSQLServer

Posted on 2006-07-13
5
Medium Priority
?
821 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:Ralf Klatt
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 1200 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

Industry Leaders: 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've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Progress
Introduction to Processes

604 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