DTS package execution problem

sek

Member
Joined
Jul 2, 2009
Messages
10
Programming Experience
Beginner
Hi All,
I am getting one problem with dts package execution.
i need to execute one dts package from vb.net application which will load the data from csv file into sql server 2000 database.my application in one system and my dts package in another system.my souce files are in another system.these files are in shared folder.

my dts code in vb.net is like below.

Dim DtsObj As New DTS.Package
DtsObj.LoadFromSQLServer(serverName, userID, password, DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", packageName, "")
DtsObj.Execute()

If DtsObj.FailOnError() Then
sw.WriteLine("Package Execution Failed")
sw.WriteLine()
MessageBox.Show("Dts Package Execution Failed")
Me.Close()
Else
sw.WriteLine("Package Execution Successfull")
sw.WriteLine()
End If

but this job is some times executing and sometimes failing.i am not getting any failure message and there is code below this also in my application.and that's also executing.how can i make it compulsary execute the dts package or how to exit the application in case if it fails?

actually i am not understanding where is the problem exactly?is't necessary that we need to login to the system where source files are exist from the .net application's system before running the application???i felt that when i connected once its working fine.

thanks in advance.
 
Back
Top