Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 20th, 2007, 04:04 PM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default -2147217871 TimeOut Using ADO and SQL Server 2000

I'll try the short version first. I get an error -2147217871 (timeout expired) on an insert to a table with 28 fields. I have several smaller tables in the same db that work fine in performing deletes and inserts. What is hopefully a clue is that inserts to the larger table work at the click of a key if I have just resized any of the larger table fields, saved, and then run my code. The code will work two or three times consecutively, then it breaks with the timeout expired error, and nothing less than changing a field size again makes the larger table insert work.

Just for funsies I have set the ADO command timeout very high to see what would happen. It has been running for about an hour. No error yet, but no execution either. I have set no locks that I am aware of.

Thanks in advance for any help.


 
Old November 21st, 2007, 04:11 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Sounds like there might be a lock on some data. Can you see anything suspicious in the manager or the SQL logs?

--

Joe (Microsoft MVP - XML)
 
Old November 21st, 2007, 01:22 PM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I posted to another individuals similar problem that I had gone into Enterprise Manager (on a private development server) and killed all lock processes I found. My code then worked.

The only place I have stipulated locks is on edited records using MS Access's 2007 default project setting in Options. I suspect that the lock is not being released because I am in development and working specifically on the code that when it breaks before proper termination leaves locks in place.

Last evening I had input a dozen records and they all acted as expected. Now, I think I am looking for advise on how to check for active locks and unlocks them on program startup. I am guessing that would be to check for the appropriate error number in my error routine and close the table. Have no idea yet if that is really what I need to do.

Thanks for the reply. I had been messing with this for a week and really did not expect to find a potential answer so soon after posting the inquiry.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Error:-2147217871 Timeout expired sgsandeep SQL Server 2000 11 November 20th, 2007 08:49 PM
SQL Server timeout expired msbsam SQL Server 2000 3 October 17th, 2007 10:47 AM
Timeout when connection to SQL Server in WiFi LAN smp4774 SQL Server 2000 1 June 29th, 2007 07:15 AM
SQL Server 2000 and SQL Server 2000 CE dparsons SQL Server 2000 1 July 31st, 2006 12:59 PM
Age Old ODBC Sql Server Driver Timeout busher Classic ASP Databases 5 December 7th, 2005 12:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.