Jump to content
Xtreme .Net Talk

Anthony_n

Members
  • Posts

    3
  • Joined

  • Last visited

Anthony_n's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. without looking at your code can u would it not be better to do so somthing like this System.Threading.Thread.Sleep(10)
  2. u have to create you own dialog
  3. if the Xp_cmdshell is not disabled, create a stored proc and exec DTSrun if not then there is a com object Public Sub Call_DTSPKG(ByVal Name As String, ByVal ServerName As String, ByVal UserName As String, ByVal Password As String) '***************************************************************************************** 'Function: Call_DTSPKG 'PURPOSE: Runs a DTS 'PARAMETERS: Name As String, ServerName As String, Username As String, Password As String 'CALLED By: Mail_Sort 'SIDE EFFECTS: NONE ' ' 'You have to add the ref Microsoft DTS Package from the com objects menu or you will 'get a error on the line Dim DTSItem As New DTS.Package ' '***************************************************************************************** On Error GoTo MyErrHndl Dim DTSItem As New DTS.Package Dim Msg As String DTSItem.LoadFromSQLServer(ServerName, UserName, Password, 0, , , , Name) DTSItem.WriteCompletionStatusToNTEventLog = True DTSItem.FailOnError = True DTSItem.Execute() DTSItem = Nothing Exit Sub MyErrHndl: MsgBox("DTS Failed" & vbCrLf & vbCrLf & Err.Description) End Sub
×
×
  • Create New...