dbTalk Databases Forums  

run DTS in vb or through stored procedure

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss run DTS in vb or through stored procedure in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
helenz
 
Posts: n/a

Default run DTS in vb or through stored procedure - 05-27-2005 , 04:35 PM






I got a problem to call my dts inside vb code. I can run
my dts successfully in sql server enterprise manager or in the command line.
but when I try to call it through stored prcedure, it fail and
I even can't catch the error.

my stored prcedure is like:

CREATE PROCEDURE [dbo].[CSCDDTSRefresh] AS
EXEC master..xp_cmdShell 'dtsrun /S server /N "DTS_CSCD" /G
"{4729D6E9-0AED-4BD3-A2A1-B617836EB22D}" /V
"{FE153DB1-583D-4246-B786-2554AF57A0F5}" /U "sa" /P "pass" ' , no_output
GO

and I called in my vm code:

Dim dbConn As New SqlConnection(connectionString)
Dim command As New SqlCommand("CSCDDTSRefresh", dbConn)
command.CommandType = CommandType.StoredProcedure
dbConn.Open()
command.ExecuteNonQuery()
dbConn.Close()

Can somebody help?
Thanks,

helenz

Reply With Quote
  #2  
Old   
Mike Gercevich via SQLMonster.com
 
Posts: n/a

Default Re: run DTS in vb or through stored procedure - 05-28-2005 , 12:50 AM






Have you tried to enable logging on your package to a server-local file?
If the file is created, the package is getting loaded and executed. Any
errors will be logged to the file. If no file is created, you have a
permission problem in package execution.

-Mike

--
Message posted via http://www.sqlmonster.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.