Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to run a DTS package from a webpage in asp.net

How to run a DTS package from a webpage in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MissionSuccess
    wrote on last edited by
    #1

    dear all i have to run a dts package to dump a table's data to a shared drive. i want to provide this facility to my End Users. whenever they want they shd be able to run that DTS on click of a button for this i have done the following code...... Try Dim dtsp As New DTS.Package dtsp.LoadFromSQLServer( _ ServerName:="servername", _ ServerUserName:="UID", _ ServerPassword:="PWD", _ PackageName:="PackageName") dtsp.Execute() Catch ex As Exception lblError.Text = ex.Message End Try when i run it it does not give any error neither it gives me the desired file,which should be generated after running the dts. on the other hand when i run it manually it generates the same. any suggetion

    J 1 Reply Last reply
    0
    • M MissionSuccess

      dear all i have to run a dts package to dump a table's data to a shared drive. i want to provide this facility to my End Users. whenever they want they shd be able to run that DTS on click of a button for this i have done the following code...... Try Dim dtsp As New DTS.Package dtsp.LoadFromSQLServer( _ ServerName:="servername", _ ServerUserName:="UID", _ ServerPassword:="PWD", _ PackageName:="PackageName") dtsp.Execute() Catch ex As Exception lblError.Text = ex.Message End Try when i run it it does not give any error neither it gives me the desired file,which should be generated after running the dts. on the other hand when i run it manually it generates the same. any suggetion

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      Create a stored procedure and execute the DTS package from with in the stored procedure. then just execute that Stored Procedure from your asp.net page. here is an article that may help[^]

      Regards
      J O H N :rose:
      "Even eagles need a push." David McNally


      M 1 Reply Last reply
      0
      • J John ph

        Create a stored procedure and execute the DTS package from with in the stored procedure. then just execute that Stored Procedure from your asp.net page. here is an article that may help[^]

        Regards
        J O H N :rose:
        "Even eagles need a push." David McNally


        M Offline
        M Offline
        MissionSuccess
        wrote on last edited by
        #3

        i have done that also.... SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO ALTER PROCEDURE usp_ImportData AS begin DECLARE @DTSRUNCommand as varchar(255) SET @DTSRUNCommand = 'DTSRUN /N ' + 'PackageName /E /S ' + '@@ServerName' EXEC master..xp_cmdshell @DTSRUNCommand end GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO it gives me some permission problem. DTSRun: Loading... Error: -2147467259 (80004005); Provider Error: 17 (11) Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 NULL what to do.. i am system admin on the Server. And i have all the rights.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups