Internal connection fatal error

Discussion in 'ASP .Net' started by =?Utf-8?B?bS5XYXJk?=, May 10, 2004.

  1. We are running a asp.net site, we are using a tiered architecture with the data class looking like

    Function MyDataReader(ByVal stylemainid As Int32, ByVal letter As String) As SqlDataReade
    Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("connectionString")
    myConnection.Open(
    Dim myCommand As SqlCommand = New SqlCommand("", myConnection
    myCommand.CommandType = CommandType.StoredProcedur
    Dim styleparam As SqlParameter = New SqlParameter("@stylemainid", SqlDbType.Int
    styleparam.Value = stylemaini
    myCommand.Parameters.Add(styleparam
    Dim styleparam2 As SqlParameter = New SqlParameter("@letter", SqlDbType.Char
    styleparam2.Value = lette
    myCommand.Parameters.Add(styleparam2
    Return myCommand.ExecuteReader(CommandBehavior.CloseConnection
    End Functio

    The problem we have it intermitten errors from the try, catch block and they report:

    System.InvalidOperationException: Internal connection fatal error
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior
    at vs2.MyDataReader.RunASQLStatement_ReturnReader(String sql
    at vs2.icart.AddTuneToCart(
    at vs2.icart.Page_Load(Object sender, EventArgs e

    We have tried everything, even rewritten the data access, basically we have a test page the refreshes every 30 seconds and re-reads a table and sure enough it will just work then suddenly display the above errors. please help.
    =?Utf-8?B?bS5XYXJk?=, May 10, 2004
    #1
    1. Advertising

  2. You're probably doing this already, but I wanted to check whether you are
    closing your datareader appropriately after using it.

    CommandBehavior.CloseConnection closes the Connection object when the
    associated DataReader object is closed. Is it possible that you are running
    out of connections? Can you monitor the connection count?

    "m.Ward" <> wrote in message
    news:...
    > We are running a asp.net site, we are using a tiered architecture with the
    > data class looking like:
    >
    > Function MyDataReader(ByVal stylemainid As Int32, ByVal letter As
    > String) As SqlDataReader
    > Dim myConnection As SqlConnection = New
    > SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
    > myConnection.Open()
    > Dim myCommand As SqlCommand = New SqlCommand("", myConnection)
    > myCommand.CommandType = CommandType.StoredProcedure
    > Dim styleparam As SqlParameter = New SqlParameter("@stylemainid",
    > SqlDbType.Int)
    > styleparam.Value = stylemainid
    > myCommand.Parameters.Add(styleparam)
    > Dim styleparam2 As SqlParameter = New SqlParameter("@letter",
    > SqlDbType.Char)
    > styleparam2.Value = letter
    > myCommand.Parameters.Add(styleparam2)
    > Return myCommand.ExecuteReader(CommandBehavior.CloseConnection)
    > End Function
    >
    > The problem we have it intermitten errors from the try, catch block and
    > they report:
    >
    > System.InvalidOperationException: Internal connection fatal error.
    > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
    > cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
    > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
    > behavior)
    > at vs2.MyDataReader.RunASQLStatement_ReturnReader(String sql)
    > at vs2.icart.AddTuneToCart()
    > at vs2.icart.Page_Load(Object sender, EventArgs e)
    >
    > We have tried everything, even rewritten the data access, basically we
    > have a test page the refreshes every 30 seconds and re-reads a table and
    > sure enough it will just work then suddenly display the above errors.
    > please help.
    Ken Cox [Microsoft MVP], May 10, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Julian Bowes
    Replies:
    0
    Views:
    669
    Julian Bowes
    Jul 1, 2003
  2. Jeff Kennedy
    Replies:
    0
    Views:
    1,515
    Jeff Kennedy
    Oct 20, 2003
  3. =?Utf-8?B?TWF5?=

    Internal connection fatal error.

    =?Utf-8?B?TWF5?=, Oct 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,066
    =?Utf-8?B?TWF5?=
    Oct 7, 2005
  4. SteveoAtilla via DotNetMonster.com

    Internal Connection Fatal Error

    SteveoAtilla via DotNetMonster.com, Mar 2, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    392
    SteveoAtilla via DotNetMonster.com
    Mar 2, 2007
  5. =?Utf-8?B?cGF0cmlja2RyZA==?=

    Internal connection fatal error and other random db connection err

    =?Utf-8?B?cGF0cmlja2RyZA==?=, Jun 14, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    563
    =?Utf-8?B?cGF0cmlja2RyZA==?=
    Jun 14, 2007
Loading...

Share This Page