Solved

SqlBulkCopy Timeout only on first attempt

Posted on 2008-10-21
3
300 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
ID: 22773849
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
ID: 22821758
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
ID: 22822975
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

815 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

10 Experts available now in Live!

Get 1:1 Help Now