![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am getting frastrated by trying to call DTSrun inside the stored prcedure. I want to my DTS triggered by user interface clicking. So I wrote a stored procedure inside sql server and call DTS inside the stored procedure: CREATE PROCEDURE [dbo].[CSCDDTSRefresh] AS EXEC master..xp_cmdShell 'dtsrun /S sqlserver /N "DTS_CSCD" /G "{4729D6E9-0AED-4BD3-A2A1-B617836EB22D}" /V "{FE153DB1-583D-4246-B786-2554AF57A0F5}" /U "sa" /P "pass" ' , no_output GO Then inside xx.vb file, sub DTSRefresh() As Int16 Dim dbConn As New SqlConnection(connectionString) Dim command As New SqlCommand("CSCDDTSRefresh", dbConn) command.CommandType = CommandType.StoredProcedure dbConn.Open() command.ExecuteNonQuery() dbConn.Close() End Sub I can run my DTS manually successfully. But every time when I call from the stored prcodure, nothing happened. How can I catch error? can Somebody help? Really appreciate. -- helenz |
![]() |
| Thread Tools | |
| Display Modes | |
| |