Pick a file to import?[RESOLVED]
Does anyone know if there is a way to be able to select a file you want to import if you already have a DTS setup? This is what I have right now:
VB Code:
Dim excel As String = "exec master.dbo.xp_cmdshell 'dtsrun -E -S crserver -N High_Accurint'"
Dim SqlConn56 As SqlConnection = New SqlConnection(strConnectionString)
Dim cmdSqlCommand56 As SqlCommand = New SqlCommand(excel, SqlConn56)
Try
cmdSqlCommand56.Connection.Open()
cmdSqlCommand56.ExecuteNonQuery()
Catch ex As SqlException
MessageBox.Show(ex.Message)
Exit Sub
Finally
If SqlConn56.State = ConnectionState.Open Then
SqlConn56.Close()
End If
End Try
If there is no way to do this, I can just manually change the name of the file everytime, but who wants to do that.
Any ideas?