none
A transport-level error has occurred when receiving results from the server.(provider:TCP Provider,error:0-The handle is invalid RRS feed

  • Question

  • Hi,

    I am using SQL Server 2005,

    while trying to retrieve data from the database; I am getting the following error:

     A transport-level error has occurred when receiving results from the server. (Provider: TCP Provider, error: 0 - The handle is invalid.)

     But I am getting this error randomly.

     Can some one help me out?
     Waiting for your response

     Sudhakar

    Wednesday, January 24, 2007 7:59 AM

All replies

  • Hi Sudhakar

    Please can you be a little more specific.

    Are you getting this error in SQL Query Analyzer? Are you getting this from some sort of Access or .NET front end application? Or is it from an ASP application?

    if you provide a little more info im sure we can work this out.

    Barry

    Wednesday, January 24, 2007 9:34 AM
  • Hi Barry,

    I had developed a Web Application using ASP.Net 2005 and using SQL Server 2005 as backend ,

    Please review the following code:

    **************************************************************

    Try
                Dim con As New SqlConnection("server=101998-WEB1;database=TriMark;Integrated Security=SSPI")
                con.Open()
                Dim da As New SqlDataAdapter("select * from tblusers", con)
                Dim ds As New DataSet
                da.Fill(ds)
            Catch ex As Exception
                Response.Write(ex.Message)
            End Try

    *************************************************************

    I was getting fllowing error when we try to fetch data from the database through .net application.

     Error: A transport-level error has occurred when receiving results from the server. (Provider: TCP Provider, error: 0 - The handle is invalid.)

     But I am getting this error randomly.

     Can some one help me to sort out this?

    Waiting for your response

     Sudhakar


    Wednesday, January 24, 2007 9:52 AM
  • Hi, Sudhakar

         To lock down the issue, can you provide the stack info when the error occured? Also, can you following the blog:http://blogs.msdn.com/sql_protocols/archive/2006/08/04/688396.aspx.

         to collect ETW trace and send it to protcols@microsoft.com

     

    Thanks!

    Ming.

     

    Wednesday, January 24, 2007 6:13 PM
  • Is there any possibility the application uses one connection from multiple threads? 

    If one thread closed the connection, and another tried to use it it could generate this error. 

     

    Wednesday, January 24, 2007 9:15 PM
    Moderator
  • Sudhakar, Can you please share with me your findings on this issue. I am seeing similar issue randomly Thanks.
    Wednesday, March 7, 2007 11:18 PM
  • Hi All,
    I also faced the same problem in my web application. I am posting my solution as it resolved the same problem of random errors.
    1. I have used MVC architecture & then used microsoft . applicationblocks.dll version 2.0 in application framework.
    the dll provided by Microsoft manages everything with connection pooling.
    Previously i was getting random errors of SQL connection string not initialized properly, Unable to read from data reader when reader is closed., Viewstate mac is failed., ID does not belong to Table table.

    But after using the DLL it resolved my problem.
    Hope this will help others in solving the problem.

    • Edited by amod nikam Tuesday, July 28, 2009 6:49 AM want to get alert
    Tuesday, July 28, 2009 6:49 AM
  • Hi All,
    I also faced the same problem in my web application. I am posting my solution as it resolved the same problem of random errors.
    1. I have used MVC architecture & then used microsoft . applicationblocks.dll version 2.0 in application framework.
    the dll provided by Microsoft manages everything with connection pooling.
    Previously i was getting random errors of SQL connection string not initialized properly, Unable to read from data reader when reader is closed., Viewstate mac is failed., ID does not belong to Table table.

    But after using the DLL it resolved my problem.
    Hope this will help others in solving the problem.

    hi friends,

    which DLL did use to resovle above issue?i will appreciate your reply

    Tuesday, April 12, 2011 6:43 PM
  • I got this error and i just need to close the conection that i was not closing. :) 

    Monday, June 24, 2019 11:33 AM