Executing a Package from Visual Basic

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/bknight/executingpackagefromvisualbasic.asp

  • This article is a good start for my project..I am transforming data from a query to a .csv file and I need to programatically change the name of the results filename. I feel that I can utilize the Global Variable function to do this...I need to control the name of the textfile via ASP.

  • good for start, but if I have more complex dts...may be I can create a job and after execute it from vb.exe with

    "sp_start_job @job_name = 'My Job'"

    using and ADO connection and execute it.

  • Excellent !!!

    Good job to describe in few lines

    Can I use this variables as a parameter to my SQL server Query for downloading the data

    Thanks again

    AMIT

  • Hi Brian,

    Thanks for the great website.

    I have a Vb program which needs to call a DTS to load some data into SQL server from a text file. I managed to execute the DTS, but I couldn't get any return from DTS, so don't know if my data is loaded correctly unless I check from SQL server. Could you please explain how to solve this problem? Thank you very much!

    Tina from Singapore

  • Hi Brian,

    I have many long running dts packages and need a way to notify the client of how many rows have been read.  I have played with the On Progress event but my package just freezes up when I check this event. 

    Another nice feature that I want to add is the ability to cancel a package once it starts. 

    Any ideas.....

    Thanks for your help

  • Hi Brian,

    Example is really great to get kick off with DTS package stuff.

    Can you explain further, [Global Input Paramerter in DTS] which we set ,,,,,, instead of passing it through VB application can i make it pass through SQL itself (lookup from another table) so tat i can use specified DTS package at schedule. instead of making an exe and running it as service.


    Kindest Regards,

    Mohd Haneef

    Haneef@AFG.COM.KW

  • If your process is long time running process maybe you can send email to client when it is done. DTS package has this possibility or you can use SQL command inside DTS package to send e-mail from SQL server

    Thanks

    Janusz

  • This is just a general question. This example may work if you are using VB6 but what about us that use c# and the .NET 2.0 framework? If there is a way to execute an SQL 2000 DTS Package in .NET 2.0 I have yet to figure it out.

  • Create your DTS package and save it as VB script, next open it in VS2003 or VS2005 and allow VS to convert it. After that you will have all you need to run package from .Net language. You will have some error to fix because the conversion is not fully valid but they are very easy to fix. You can use this created code to not only run package from your application but you can also create it from your application.

    Thanks

     

  • This is a good example of calling a 2000 DTS package.

    What is the logical equivalent for a 2005 Integration Services package?  Since they aren't necessarily stored on the server, is there a trick?

  • Anyone have any thoughts as to why the Microsoft DTS reference wouldn't be available in VB?

    Thanks

  • My first thought would be - what version of VB? in 2005 and 2008, MS got picky as to what feature you could get to depending on the version. I don't think you can get to it unless you have the SQL client components installed AND you have VB.NET pro or better.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • I have .NET 2008, but not sure about the Client Components. How can I confirm installation/install that?

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply