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 |