Solved

SqlBulkCopy Timeout only on first attempt

Posted on 2008-10-21
3
298 Views
Last Modified: 2012-05-05
I'm using SqlBulkCopy in an ASP.NET web page for uploading csv files into the database. The solution I found was pulled right off the web and works incredibly fast and slick when you've already made a connection with the database. However, we are experieincing a timeout pattern that occurs when the page is accessed for the first time and attempt to upload. After a second try the upload works lightning fast. Can anyone help me figure out what may be causing this initial timeout??? I love this upload solution and need to keep using it for other projects.
0
Comment
Question by:HangTenDesign
  • 2
3 Comments
 
LVL 14

Expert Comment

by:Ramuncikas
Comment Utility
What particular error do you get? We can guess many times but at least error code and a bit of sample code would help much to point out a problem.
0
 

Accepted Solution

by:
HangTenDesign earned 0 total points
Comment Utility
I changed the Command timeout parameter and it took care of the problem. For some reason it runs longer on first run that on second. I have a feeling SQL server keeps connections and querries cached for a time.
0
 

Author Comment

by:HangTenDesign
Comment Utility
Ok, I just got a message stating that it can't install becasue the version I'm trying to install is incompatible with a previous version. I'm not sure why this is happening. I thought .NET can run side by side with previous versions.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now