Error - 2147217871 80040e31 Timeout
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 and it came down
i keep getting the error:Runtime error '2147217871 (80040e31)' Timeout Expired.I am using "cnPubs.ConnectionTimeout = 0"this command in my code so it should not give me atimeout error.But i keep getting the error.There are many joins in my stored procedure and the datais huge,,lakhs of records..Is the error because of thehuge data???? i dont understand.My procedure is as follows..I am using this procedureSub DataExtract()Dim cnPubs As ADODB.ConnectionSet cnPubs = New ADODB.ConnectioncnPubs.ConnectionTimeout = 0Dim strConn As StringstrConn = "PROVIDER=SQLOLEDB;"strConn = strConn http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=90095 & "DATA SOURCE=(PRODUCTXP);INITIALCATALOG=PROREPORTING;"'strConn = strConn & "DATA SOURCE=(local);INITIALCATALOG=LTFG;"strConn = strConn & " INTEGRATED SECURITY=sspi;"cnPubs.Open strConncnPubs.ConnectionTimeout = 0Dim cmd As ADODB.CommandSet cmd = New ADODB.CommandSet cmd.ActiveConnection = cnPubscmd.CommandText = "PRO_SP"cmd.CommandType = adCmdStoredProccmd.ExecutecnPubs.CloseSet cnPubs = NothingEnd SubThe stored procedure runs for about 3 minutes.2. How do i import this data to excel sheet? Actuallythis code is in http://microsoft.public.sqlserver.programming.narkive.com/ln1U5FYw/runtime-error-2147217871-80040e31-timeout-expired visual basic editor of the excel sheet.how do i dump the data to the excel sheet??Thanks in advance for any helpVamsi oj 2003-12-04 07:46:24 UTC PermalinkRaw Message You want to set the CommandTimeOut property to unlimited.e.g.cmd.CommandTimeout = 0---ojRAC v2.2 & QALite!http://www.rac4sql.netPost by VamsiHaican someone suggest me what is the problem with my code?Runtime error '2147217871 (80040e31)' Timeout Expired.I am using "cnPubs.ConnectionTimeout = 0"this command in my code so it should not give me atimeout error.But i keep getting the error.There are many joins in my stored procedure and the datais huge,,lakhs of records..Is the error because of thehuge data???? i dont understand.My procedure is as follows..I am using this procedureSub DataExtract()Dim cnPubs As ADODB.ConnectionSet cnPubs = New ADODB.ConnectioncnPubs.ConnectionTimeout = 0Dim strConn As StringstrConn = "PROVIDER=SQLOLEDB;"strConn = strConn & "DATA SOURCE=(PRODUCTXP);INITIALCATALOG=PROREPORTING;"'strConn = strConn & "DATA SOURCE=(local);INITIALCATALOG=LTFG;"strConn = strConn & " INTEGRATED SECURITY=sspi;"cnPubs.Open strConncnPubs.ConnectionTimeout = 0Dim cmd As ADODB.CommandSet cmd = New ADODB.CommandSet cmd.ActiveConnection = cnPubscmd.CommandText = "PRO_SP"cmd.CommandType = adCmdStoredProccmd.ExecutecnPubs.CloseSet cnPubs = Not
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 http://www.bigresource.com/MS_SQL-Run-time-error-2147217871-80040e31--VWUpvDDq.html 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 http://www.ozgrid.com/forum/showthread.php?t=62857 Error '80040e31': Please Help Me! SQL Server Error '80040e31' Timeout Expired Strange. 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 error - 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 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 error - 2147217871 - 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'll goin to help me,, thanks in advance! View 2 Replies View Related TSQL + VBA - Retrieve SQL SERVER 2000 Data Trough Excel 2003 - Time Out Error 80040e31 Sep 17, 2007 Hi guys,When I thought everything is okay with this script, I got a new problem...I have a VBA's script from Excel 2003 that builds sql script and retrieves data from SQL SERVER 2000.in order to make the sql running, I need to use a mul
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 Timeout Error When Running Sql Query From Vba 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 7 of 7 Thread: Timeout Error When Running Sql Query From Vba Thread Tools Show Printable Version Search Thread Advanced Search January 16th, 2007 #1 brolling View Profile View Forum Posts I agreed to these rules Join Date 16th January 2007 Posts 4 Timeout Error When Running Sql Query From Vba Hi. I am receiving a timeout error when running a SQL query from VBA. Here is the code I am trying to run (I inherited this code and admittedly do not know exactly what each of the commands is doing): VB: Dim SQLServerPath As String Dim SQLQuery As String Dim SQLData As ADODB.Recordset Dim FirstDataCell As String SQLQuery = _ "THIS IS THE SQL QUERY I WANT TO RUN" SQLServerPath = "Provider=SQLOLEDB;" & _ "Data Source=MYDATA;" & _ "Initial Catalog=MYCATALOG;" & _ "Integrated Security=SSPI" Set SQLData = New ADODB.Recordset SQLData.Open SQLQuery, SQLServerPath, adOpenForwardOnly, adLockReadOnly, adCmdText If Not SQLData.EOF Then wks.Range(FirstDataCell).CopyFromRecords