[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Timeout Expired 80040e31 using VB to call SQL sp

Posted on 2006-03-20
6
Medium Priority
?
2,405 Views
Last Modified: 2008-01-09
I have a timeout error each time I try to insert a set of records from one SQL DB to another. I call the sp from VB. It's only inserting 65k records. I run the procedure in Query Analyzer and it takes 29 seconds.

Not sure if it is a permissions issue or something else.

Happy to provide additional info.

Thank you!
0
Comment
Question by:IDIee
6 Comments
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 500 total points
ID: 16236889
It's going to take a little bit longer to run in VB then in Query Analyzer.  Just extend your timeout period.

cmd.commandtimeout = 60
0
 
LVL 20

Expert Comment

by:Sirees
ID: 16236900
Try setting your CommandTimeout property to a higher value than the default 30 seconds.
0
 
LVL 7

Expert Comment

by:IT-Schubertz
ID: 16236910
Hi,

this does not seem like a permission issue.
What timeout have you set in your connection string? Probably none or the default of 15 sec.
Try to add this to your Connection String: Timeout=0;
this will ensure that the connection does not time out at all but rather waits until your commands have finished.

HTH

Andy
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:IDIee
ID: 16236969
Thank you, I'll try and then get back to assign points.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 16243698
>>or the default of 15 sec.<<
We are talking about the ADO CommandTimeout here not the ConnectionTimeout
0
 
LVL 7

Expert Comment

by:IT-Schubertz
ID: 16245165
ac, you are of course right :-) I missed on that
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

830 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