Running a DTS Package from vb.net

Can anyone point me to some sample code ord give me an example.  I'm trying to run a DTS package from my asp.net/vb.net application.  I don't need to pass it any variable, just need it to run.  I can't seem to find anything on the net for this.

Thanks in advance,
Ryan

0
morserya
9/12/2005 6:26:17 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

7 Replies
576 Views

Similar Articles

[PageSpeed] 12
Get it on Google Play
Get it on Apple App Store

There are two ways to do it, through VB.NET code, or through a stored procedure using master..xp_cmdshell.  Here's one:

http://www.realworldasp.net/article.asp?article=61
http://www.msnewsgroups.net/group/microsoft.public.dotnet.languages.csharp/topic7332.aspx


Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
0
bmains
9/12/2005 7:56:53 PM
 bmains wrote:

There are two ways to do it, through VB.NET code, or through a stored procedure using master..xp_cmdshell.  Here's one:

http://www.realworldasp.net/article.asp?article=61
http://www.msnewsgroups.net/group/microsoft.public.dotnet.languages.csharp/topic7332.aspx



The links you provided are not working solutions because the creators have not addressed the SQL Server Agent permissions needed to run DTS with dtsrun.exe  and xp_cmdshell.

To run DTS package through a stored proc you either use DTSRUN.exe or XP_CMDSHELL which is SQL Server Agent dependent. Try the links below for DTSRUN.exe sample code and XP_CMDSHELL configurations with permissions.  What I am saying is to run DTS with SQL Server Agent dependent service like xp_CMDSHELL you must give the account used to install SQL Server Agent Admin permissions in Windows and SQL Server. Hope this helps.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_8sdm.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp

http://www.sqlteam.com/item.asp?ItemID=19595 


Kind regards,
Gift Peddie
0
Caddre
9/12/2005 8:33:04 PM
This seems way too complicated.  Isn't there simple code I can use to create a stored procedue that calls a dts package.  Then I can just execute the stored procedure from my asp page.  I'm just looking for some sample T-SQL code that executes a DTS Package.  

like this.  spexecuteDTSPackage('mypackage')

This would be wonderful.
0
morserya
9/13/2005 8:09:55 PM
I don't know of an easier way because it is SQL Server Agent that runs your DTS package through xp_cmdshell. 
Kind regards,
Gift Peddie
0
Caddre
9/13/2005 9:17:55 PM
That is the DTSrun utility, which in a stored procedure, you have to use master..xp_cmdShell, and get the rights to do so.  See, to run it, it needs to know what server to run it on, what is the name, what are the parameters being passed into it (which is cool because you can dynamically assign the server variables in the package with values passed into the stored procedure), what is the package password if there is one
Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
0
bmains
9/14/2005 12:23:34 PM

I finally got it working.  I think I'm going to write a tutorial since there aren't any good ones out there. 

 

I generated the code for the dtsrun.exe with the dtsgui tool then created a stored procedure.

 

Thanks for all your help.

0
morserya
9/15/2005 12:44:38 PM

You ever write a tutorial for this? I have the same problem and need major help getting a dts to run from .net.

 

Cordell

0
cm1jm1
7/31/2006 4:52:15 PM
Reply:

Similar Artilces:

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

DTS Package and vb.net
Hi, I am new to DTS Package,I dont know how to create the DTS Package could someone please help in this and i need to call that dts in vb.net application.is there any way to create dts using coding instead of DTS Designer Wizard.my requirement is i need to create the dts package to upload the table into txt files and schecule that dts daily,i need to call that dts in stored procedure. very urgent Hi,  ' prepare a SQL procedure and,     Imports System.Data     Imports System.Data.SqlClient    .......    b...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

Run vb.net applications on computers without the net framework
So started a new vb.net project but then i realised, that if vb.net applications only work on computers with the net framework installed i am going to be very limited, there are so many users without it wich means loss of customers.So is it possible to build an vb.net applicaiton that can run on a computer without the netframework??Free Web Hosting - My asp.net website In order to run an Windows application created for the .NET Framework, the client will need to have the .NET Framework installed. The .NET Framework is part of Windows update, so there's a good chance that man...

Executing DTS package from VB.NET
Hello, I have a web application that I kick off a DTS package. I tested the package and it works fine. However, when running the package through ASP.NET, I get the following error: Type mismatch. (mscorlib (80004005): Missing parameter does not have a default value. Parameter name: parameters)\n I've traced it to a dynamic task step. I have this as the first step in the workflow, but for some reason, it is executing last. Which is definitely not the place where I want it. Is there anyway I can force it, or why is it doing that? Any ideas? BrianBrian"Trust in the Lord...

Calling a Dts package from VB.NET
hi, i'm trying to call a dts package from vb.net. i got 2 examples which both don't work. first one gives me a [DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied error. source code:Dim serverName As String = "SERVERNAME"Dim oPackage As New DTS.Package()Dim oStep As DTS.StepDim pVarPersistStgOfHost As Object = Nothing oPackage.LoadFromSQLServer(serverName, "USERID", "PASSWORD",     DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _  "DTSPASSWORD", Nothing, Nothing, "DTSPACKAGENAME", pVarPersistStgOfHost) For Each oStep In oPackage.Steps&n...

vb.net vs c#.net vs j#.net
just out of curiousity which looks, acts most like java? i'm still learning trying to used to vb.net but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

simple web application created in VB.net(VS.Net) will not run
I tried to run the ASP.net samples created by VB.net. But it doesn't run successfully. For example, I copied VB project folder at C:\Inetpub\wwwroot\VB\Project. From the web browser I typed http://localhost/VB/Project/Project.aspx Only the text for some LabelControls showed up, not the content Text generated by project.aspx.vb. Does that mean that I didn't set the IIS and ASP.net correct? Can you post the source code for your application. This may make it easier to debug what is going on. Thanks. Glen Kowalski Software Design Engineer / Test Microsoft Corporation This posti...

Upgrade VB.net 2002 to VB.net 2003
Hi, i want to upgrade VB.net 2002 to VB.net 2003.what is the procedure?Uninstall 2002 and Install 2003 or something else? VB.net 2003 includes Framework 1.1 or i will install it separately?thanx in advance ...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

C#.NET or VB.NET
what lang does everyone prefer? Thanks, Peter Iuvara, MCP It's a very famous debatable question in forums! I would say if you are from Java/C/C++, then C# would be easy to use for you. If you are from ASP/VB, then VB.NET would be easy for you! As long as if you follow CLS, then what ever the language you use, it's going to be the same for CLR!Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti I would agree with that ... just curious as to what user's on this forum predominantly code in?Thanks, Peter Iuvara, MCP I came from no real programming background, started i...

About VB.net And VC.net
I am always Programming With VB.net Recently My Teacher ask us to learn Vc or VC.net. I try to learn it and compare it with vb.net, I found it's much too complex than vb. However it is said vc is strongger than vb I want to know Why vc is strongger than vb? and is it hard too learn vc? I am new to asp.net Thanks for man who want to help me! Wuhan, Hubei, China Below links could give some info http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q308470Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti VisualC is not a language in an of itself...

vb .net or c# .net
I currently develop websites using php but have been requested to develop a site using asp.net. The question I have is for someone who knows php would it be better to transition to vb.net or c#.net? Thanks, Fr. Robert C# -> There is a converter that will transition about 60% or more of your PHP code to C#. Plus C# is closer to PHP than VB.NET.Jason N. GaylordASPInsider and Microsoft MVPhttp://jasongaylord.com...

VB.Net To C#.Net
Hello... Since Last from 1 year i had develope web application in using vb.net now i want to transfer from vb.net to c#.net so what should i do to transform to c# language any link or book related to me through i can easily understand and coding using c# in a short time... Thanks~ Mark As Answer If UseFull ~Kaushal. Hi, you can read the specifications of the language. You're already familiar with .NET and how to program in an OO manner thanks to your experience with vb.net. The only thing you need to learn is the new syntax of C#. You can also convert parts of your v...

Web resources about - Running a DTS Package from vb.net - asp.net.sql-datasource

Running - Wikipedia, the free encyclopedia
This article is about the type of locomotion in humans. For running in horses, see Horse gait . For locomotion in dogs, see Gait (dog) . For ...

An astronaut is running the London Marathon from space
You know all those excuses you have for not training for a marathon? Your bad knee, your crazy work schedule, your inability to stop binge watching ...

Tony Bevan: Former Wollongong mayor accused of running paedophile network
A FORMER Kings Cross sex worker has opened his little black book containing the names and details of high profile clients he claims were a part ...

Time is running out to upgrade or abandon Internet Explorer
Microsoft is scrapping security updates for older versions of Internet Explorer as it pushes PC owners towards Windows 10.

Rodale to Fold Running Times
Rodale is folding Running Times magazine. The January/February issue will be its final publication. Rodale, which also owns Runner’s World, ...

‘Maze Runner: The Scorch Trials’ catches up with official endless running game
... with the Gladers across the Scorch. Run, Gladers, run Indeed, just like its predecessor, Maze Runner: The Scorch Trials is naturally a running ...

Cardinals running backs show that they have depth too
The Cardinals were searching for a breakthrough moment in the second half and their one-two punch at running back provided just that.

Petrolicious goes running up that Hill in a Ferrari 250 GTO
Filed under: Videos , Ferrari , Classics Watch Derek Hill pilot his father's Ferrari 250 GTO in seven minutes of unedited footage courtesy of ...

Hillary Is Better Than Any Of The Republicans Running For President But, At Least At This Point, That's ...
Last night Dr. Richard Champion showed us how Hillary had helped enable BP and their offshore drilling that resulted in the world's worst marine ...

How Bear Grylls got Obama to eat half-chewed salmon from a bear on 'Running Wild'
Bear Grylls is "hugely proud" of his Alaska adventure with President Barack Obama for Grylls' show "Running Wild" on NBC, but he said there were ...

Resources last updated: 12/10/2015 1:44:55 PM