Solved

SqlBulkCopy Timeout only on first attempt

Posted on 2008-10-21
3
299 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Code works but how can I download the file? 20 67
Hidden Field Value 10 57
ASP.NET Web API or ASP.NET Core MVC? 3 51
Getting multiple values from a dataset ASP.NET(VB) 3 37
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

947 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

20 Experts available now in Live!

Get 1:1 Help Now