dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Upload .xls file to SQL Server

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Posts
    79

    Upload .xls file to SQL Server

    I got so far as to take a file from my local machine to another directory on my C: drive:

    Dim getmyFile As HttpPostedFile = myfile.PostedFile
    If IsNothing(getmyFile) Then
    Label2.Text = "Please select a file to upload"
    Label2.Text = "Line 78"
    Else
    If getmyFile.ContentLength = 0 Then
    Label2.Text = "Cannot upload zero length file"
    Else
    Dim ServerFileName As String = Path.GetFileName(myfile.PostedFile.FileName)
    getmyFile.SaveAs("C:\TestSaving\" & ServerFileName)
    Label2.Text = "Successful upload to C:\TestSaving\" & ServerFileName
    End If
    End If

    ...............now, what I need to do is take an .xls file and allow users to upload that into a specific table.
    Any suggestions or samples/articles are more than welcome!

    Thanks!

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You'll find several examples if you search the Web for "sql server upload file".
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 09:01 AM
  2. Changing Server Name
    By Levi Nkata in forum Database
    Replies: 3
    Last Post: 04-11-2001, 09:31 AM
  3. SQL Server Agent wont auto start
    By David Hay in forum Database
    Replies: 2
    Last Post: 04-02-2001, 07:11 PM
  4. Replies: 0
    Last Post: 11-20-2000, 06:32 AM
  5. How to up load Sql server data base on web
    By Gourav Sharma in forum Database
    Replies: 8
    Last Post: 06-19-2000, 01:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center