Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 503373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:23:15+00:00 2026-05-13T06:23:15+00:00

I am uploading data from Excel to SQL Server using the following structure: Private

  • 0

I am uploading data from Excel to SQL Server using the following structure:

Private Sub ado_upload()

    Dim objConnection As New ADODB.Connection
    Dim objCommand As New ADODB.Command
    Dim strSQL As String
    Dim strDSN As String
    Dim intCounter As Integer

    strDSN = "provider=SQLOLEDB;" _
    & "server=<server>;" _
    & "database=<database>;" _
    & "uid=<uid>;pwd=<pwd>;" _
    & "trusted_connection=false;"

    With objConnection
        .ConnectionString = strDSN
        .Open
    End With

    strSQL = "SET NOCOUNT ON; " _
    & "INSERT INTO dbo.[table1] ( [col1] ) VALUES ( ? );"

    With objCommand

        .ActiveConnection = objConnection
        .CommandText = strSQL
        .Prepared = True
        .Parameters.Append .CreateParameter("col1", adInteger, adParamInput)

        For intCounter = 0 To 9
            .Parameters("Col1").Value = intCounter
            .Execute
        Next intCounter

    End With

End Sub

The speed of the procedure depends on the geographic distance between the server and the computer running the procedure. On the server itself it is fast (300,000 inserts in under 10 minutes), on the other side of the country it is relatively slow (300,000 inserts could take hours). Remote uploads operate over a VPN.

I think network latency must be slowing the process down. Is there any way to get around network latency, or tweak the VPN to make the uploads faster?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:23:15+00:00Added an answer on May 13, 2026 at 6:23 am

    The speed of the procedure depends on the geographic distance between the server and the computer running the procedure.

    It really depends on how many hops you and the machine you’re connecting to on the other end are from major trunks, and the routes between. It’s not always the same route, either. Use the tracert command to see, because the bottleneck could be packets going through a 10 Mb/s connection rather than an OC line.

    On the server itself it is fast (300,000 inserts in under 10 minutes),

    It should go without saying that performing something local to the machine will run at the fastest possible speed, outside of load on the machine at the given time.

    …uploads operate over a VPN.

    While it is secure, it’s compounding the problem because the overhead of that security means you can send less per packet than if the data were unencrypted.

    As I mentioned before, you don’t any control over routes taken once your packets are outside your network. All I can suggest is to upload the files to the server, and then run from there.

    Downloads are so much faster than uploads, even though it’s still just an ADO Command. Is that because the data is being downloaded from SQL Server as binary data? Is there any way to achieve that same performance on the upload without uploading the file to the server first?

    Depends on the connection & the contract terms. Residential internet is always an asymmetric connection – you’ll have more download bandwidth than upload. The reason being that surfing/etc is download centric – you use very little bandwidth for uploads, like page requests and submitting forms. Until you want to upload files…

    The only way to get better upload speeds is to get the better connection and/or contract terms.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 311k
  • Answers 311k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There are some Viewstate Utilities listed here http://blogs.msdn.com/rextang/archive/2007/05/25/2868250.aspx. I always… May 13, 2026 at 10:17 pm
  • Editorial Team
    Editorial Team added an answer Is there a simpler, more elegant solution? Well, it depends… May 13, 2026 at 10:17 pm
  • Editorial Team
    Editorial Team added an answer The Event Structure is really just an abstraction that hides… May 13, 2026 at 10:17 pm

Related Questions

I have a web application that has a requirement to take data from an
We want to build a web application, that is specific to our domain, but
I am using LINQ to retrieve data from the Database, the variable name relative
I am uploading large files to an ASP.NET server using a standard HTML <input>
I ran across a new problem in the last week. Due to the nature

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.