Results 1 to 40 of 48

Thread: Pick a file to import?[RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2004
    Location
    Utah, USA
    Posts
    353

    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:
    1. Dim excel As String = "exec master.dbo.xp_cmdshell 'dtsrun -E -S crserver -N High_Accurint'"
    2.             Dim SqlConn56 As SqlConnection = New SqlConnection(strConnectionString)
    3.             Dim cmdSqlCommand56 As SqlCommand = New SqlCommand(excel, SqlConn56)
    4.             Try
    5.                 cmdSqlCommand56.Connection.Open()
    6.                 cmdSqlCommand56.ExecuteNonQuery()
    7.             Catch ex As SqlException
    8.                 MessageBox.Show(ex.Message)
    9.                 Exit Sub
    10.             Finally
    11.                 If SqlConn56.State = ConnectionState.Open Then
    12.                     SqlConn56.Close()
    13.                 End If
    14.             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?
    Last edited by brendalisalowe; Dec 10th, 2004 at 01:21 PM.
    Brenda

    If it weren't for you guys, where would I be?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width