Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Problem with timeout in accessing Excel file

Problem with timeout in accessing Excel file

Scheduled Pinned Locked Moved Database
helpdebugging
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rocky
    wrote on last edited by
    #1

    hi everyone, I'm working on importing records from an excel file, the problem is that I'm trying to specify a time out of about 2 minutes but it still expires on 1 minute. Here's the string that I'm using in my app.config file. Can anyone plz help me in this regard

    Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=D:\Projects\BulkCopy\BulkCopy\BulkCopy\bin\Debug\test1.xls;connect timeout=120;

    Rocky Success is a ladder which you can't climb with your hands in your pockets.

    B 1 Reply Last reply
    0
    • R Rocky

      hi everyone, I'm working on importing records from an excel file, the problem is that I'm trying to specify a time out of about 2 minutes but it still expires on 1 minute. Here's the string that I'm using in my app.config file. Can anyone plz help me in this regard

      Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=D:\Projects\BulkCopy\BulkCopy\BulkCopy\bin\Debug\test1.xls;connect timeout=120;

      Rocky Success is a ladder which you can't climb with your hands in your pockets.

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      connect timeout=120*2 will give you 2 minutes. Try it


      I Love T-SQL

      R 1 Reply Last reply
      0
      • B Blue_Boy

        connect timeout=120*2 will give you 2 minutes. Try it


        I Love T-SQL

        R Offline
        R Offline
        Rocky
        wrote on last edited by
        #3

        Actually this time out was comming form the server where I was trying to bulk copy those records so right now I'm giving the time out in SQLBulkCopy object, a few moments ago it ended in failure with 500 as its value. now I'm raising it up to 3600Secs = 1hr Hope that turns out ok

        Rocky Success is a ladder which you can't climb with your hands in your pockets.

        M 1 Reply Last reply
        0
        • R Rocky

          Actually this time out was comming form the server where I was trying to bulk copy those records so right now I'm giving the time out in SQLBulkCopy object, a few moments ago it ended in failure with 500 as its value. now I'm raising it up to 3600Secs = 1hr Hope that turns out ok

          Rocky Success is a ladder which you can't climb with your hands in your pockets.

          M Offline
          M Offline
          Michael Potter
          wrote on last edited by
          #4

          Just so you know - The Connection Timeout only comes into play when acquiring a connection to the source. It has no bearing on processing which is defaulted to 30 seconds in ADO.Net. I guess the default is 1 minute in SQLBulkCopy. If you ever want to change the ADO.Net processing timeout, it is in the Command class under CommandTimeout.

          R 1 Reply Last reply
          0
          • M Michael Potter

            Just so you know - The Connection Timeout only comes into play when acquiring a connection to the source. It has no bearing on processing which is defaulted to 30 seconds in ADO.Net. I guess the default is 1 minute in SQLBulkCopy. If you ever want to change the ADO.Net processing timeout, it is in the Command class under CommandTimeout.

            R Offline
            R Offline
            Rocky
            wrote on last edited by
            #5

            yes I used Timeout property of SQLBulkCopy and it worked for me. Thanks for ur reply :):rose:

            Rocky Success is a ladder which you can't climb with your hands in your pockets.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups