Error - 2147217871 80040e31
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get your question answered! Username: Password: Save Password Forgot your Password? All Forums General SQL Server Forums New to SQL Server Programming Run-time error 2147217871 (80040e31)" Reply to Topic Printer Friendly Author Topic eem_2055 Yak Posting Veteran Philippines 69 Posts Posted-09/27/2007: 06:51:35 Hi guys,I'm having a problem wiht this: Run-time error -2147217871 (80040e31)". There are times that this error does not occur. But there are times that this error occurs. I am using a third party software. And we don't have enough support at this moment. May I know what should I do. Moreover. We are using VB 6.0 for front end. Then SQL server 2000 for back end. Thanks DonAtWork Flowing Fount of Yak Knowledge 2167 Posts Posted-09/27/2007: 07:11:01 Looks like a timeout error to me.EDIT: see here http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=44969[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp Edited by - DonAtWork on 09/27/2007 07:12:11 Kristen Test United Kingdom 22859 Posts Posted-09/27/2007: 09:31:39 "we don't have enough support at this moment."If you aren;t doing regular maintenance of your database (reindexing and updating statistics, as well as backing up your TLog (if DB in FULL Recovery model) that could be making it sub-optimal, and doing some housekeeping might make it fast enough.If the database is big (>4GB say) and you are using SQL version 2000 then automatic expansion set to 10% (the default) could cause timeouts too. Change the expansion to a fixed size, e.g. 50MB, instead of 10%Kristen SwePeso Patron Saint of Lost Yaks Sweden 30421 Posts Posted-09/27/2007: 09:36:20 You can extend the default command timeout property from default 30 seconds to any value.E 12°55'05.25"N 56°04'39.16" oceanboy Starting Member Taiwan 44 Posts Posted-10/08/2007: 00:41:10 sounds familiar to my problem recently. When I run the stored procedure for different value, the time used for each run is different. you can either 1) set the timeout value to a bigger value like Peso SuggestedOR2) rewrite the query/ stored procedure if possible. eg use less subqueries with join in my case. For the same SP, I re-written some part of the TSQL
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Run-Time error '-2147217871 (80040e31)': Query timeout expired up vote 1 down vote favorite This error comes up when I try and run this big query. Smaller query's http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=90095 it doesn't. I have set connect timeout to 0 and that doesn't help. It looks like the connect makes it and it gets hung up at the .Open part of the code. Thank you for any help. Public Sub dbConnectTDaY() Dim cn As ADODB.Connection Dim Rec_set As ADODB.Recordset Dim MyConn, varSQL As String Dim Rw As Long, Col As Long, c As Long Dim MyField, Location As Range Dim i As Integer Dim strSQL As String http://stackoverflow.com/questions/32612164/run-time-error-2147217871-80040e31-query-timeout-expired Dim strStDt As String Dim strEnDt As String strStDt = ThisWorkbook.Worksheets("xxx").Range("B6").Value strEnDt = ThisWorkbook.Worksheets("xxx").Range("B5").Value Set cn = New ADODB.Connection Set Rec_set = New ADODB.Recordset Set Location = [A2] Rw = Location.Row Col = Location.Column c = Col strSQL = "" strSQL = strSQL & "SELECT gp.cnt" strSQL = strSQL & ",gp.pod" strSQL = strSQL & ",gp.grp_paddsa" strSQL = strSQL & ",gp.grp_rasdd" ' etc......... cn.ConnectionTimeout = 0 'To wait till the query finishes without generating error cn.Open "DSN=#EDWP;Databasename=INTY;Uid=XXXXX;Pwd=XXXXX;" If cn.State = adStateOpen Then 'If connection is success, continue 'Check for errors... Rec_set.Open strSQL, cn 'Issue SQL statement For i = 0 To Rec_set.Fields.Count - 1 ActiveSheet.Cells(1, i + 1) = Rec_set.Fields(i).Name Next i Do Until Rec_set.EOF For Each MyField In Rec_set.Fields Cells(Rw, c) = MyField c = c + 1 Next MyField Rec_set.MoveNext Rw = Rw + 1 c = Col Loop End If Rec_set.Close cn.Close End Sub excel odbc teradata share|improve this question edited Sep 16 '15 at 16:32 pnuts 33.7k63569 asked Sep 16 '15 at 14:56 Matt 367 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote cn.ConnectionTimeout = 0 only effects the timeout on the connection. You want to set the CommandTimeout also. share|improve this answer answered Sep 16 '15 at 16:13 Justin McCartney 418110 Thanks. That answered it –Matt Sep 16 '15 at 21:12 1 @Matt
there are times that this error occurs. I am using a third party software. And we don't have enough support at this moment. May I know what http://www.bigresource.com/MS_SQL-Run-time-error-2147217871-80040e31--VWUpvDDq.html should I do. Moreover. We are using VB 6.0 for front end. http://www.ozgrid.com/forum/showthread.php?t=174242 Then SQL server 2000 for back end. Thanks View 4 Replies Similar Messages: Stored Pro Run Time Erorr -2147217871(80040e31) TSQL + VBA - Retrieve SQL SERVER 2000 Data Trough Excel 2003 - Time Out Error 80040e31 SQL Server Error '80040e31': Please Help Me! SQL Server Error '80040e31' Timeout Expired Strange. error - Microsoft OLE DB Provider For ODBC Drivers Error '80040e31' -2147217871 Timeout Expired How To Convert UTC Time (retrieved From SQL) To Local Time In Reporting Services Based On Time Zone Error While Using First Time! Time Out Error Time Out Error Time Out Error Time Out Error BIG TIME SQL ERROR Time Out Error SQL Time Out Error Run-time Error .Net Run error - 2147217871 Time Error SQL Time Out Error Run Time Error ... Run-Time Error Run Time Error 339 Why I Am Getting This Error While Hosting Time Error When Connecting For The First Time Run Time Error 3146 Run-time Error - 2147217887 Run-time Error (R6009) Error While Inserting Time TCP/IP Provider Time Out Error [258] Time Format Error MS SQL Server Run Time Error Connection Time Out Error How Can I Take Millions Of Records Without Time Out Error? ADVERTISEMENT Stored Pro Run Time Erorr -2147217871(80040e31) Oct 2, 2007 Hey guys, I need your generous heart to share something with what I am experiencing. I found the error from Sql Profiler. Here is the result of my trace:/*w/o runtime*/declare @P1 intset @P1=0exec CP_glmJournalEntry_Save 1, '110802010200', 'To record PPC-Visa transaction, $4,967.39@Php46.22 select @P1/*w runtime*/declare @P1 intset @P1=NULLexec CP_glmJournalEntry_Save 1, '210204020202', 'Sample select @P1May I know if the runtime came from the stored proc or on the application itself.Moreover I want to know a lot with stored procedure. I am confusing now because there are times that runtime didn't occur. While some other times runtime occured.I hope you
Way | Trading Add-ins For Excel | Convert Excel Into Calculating Web Pages Excel Web Pages | Produce Clean Efficient VBA Code Every Time | Build Automated Trading Models In Excel | Excel Web Pages | Excel Video Training Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts What's New? Advanced Search Forum OTHER SOFTWARE APPLICATIONS Excel and/or SQL Help Automation Error Run-time error '-2147217871 (80040e31)' Time out Excel Training / Excel Dashboards Reports If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. If you don't like Google AdSense in the posts, register or log in above. Click here to view the relaunched Ozgrid newsletter. Results 1 to 3 of 3 Thread: Automation Error Run-time error '-2147217871 (80040e31)' Time out Thread Tools Show Printable Version Search Thread Advanced Search January 25th, 2013 #1 krishnamo View Profile View Forum Posts I agreed to these rules Join Date 25th January 2013 Posts 1 Automation Error Run-time error '-2147217871 (80040e31)' Time out Hi Guys, I am new to this forum. Need a little bit of help. I am trying to run a piece of code when i run the SQL Script it run well. But when i run the same script via VBA it throws the following error. --------------------------- Microsoft Visual Basic for Applications --------------------------- Run-time error '-2147217871 (80040e31)': Automation error --------------------------- OK Help --------------------------- The main idea is to automate the process of Backup of sql databases using excel VBA. All Databases are minimum 15GB size. When i run a back on a empty database same code works perfectly fine. Time out issue. Please help? Excel Video Tutorials / Excel Dashboards Reports Reply With Quote January 31st, 2013 #2 iamtrombone View Profile View Forum Posts I