Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Executing a Package from Visual Basic


Executing a Package from Visual Basic

Author
Message
Brian Knight
Brian Knight
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: Moderators
Points: 1987 Visits: 235
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/bknight/executingpackagefromvisualbasic.asp

Brian Knight
Free SQL Server Training Webinars
rmills80
rmills80
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 1
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.



alexx
alexx
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 150

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.





amitsanatshah
amitsanatshah
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 1

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





tinawx
tinawx
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 1

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





Mark Wismar
Mark Wismar
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 1

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


Mohd Haneef
Mohd Haneef
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 1
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
janusz pazgier
janusz pazgier
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 11

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


bruce spinner-349795
bruce spinner-349795
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 26
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.
janusz pazgier
janusz pazgier
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 11

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


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search