.NET and SQL: General network error:

Discussion in 'ASP .Net' started by deena, Mar 2, 2005.

  1. deena

    deena Guest

    Hello

    The following code generates an error on the Fill method, the first time it executes and runs successfully thereafter. It does this exactly the same every time. I know know it has something to do with pooling but what? I've set the max pool size to an astronomical 7500 as suggested on a thread on a forum but to no avail :(
    The connection is created before this code is executed:

    daClearance.SelectCommand = New SqlCommand("ProcGetBookingsByVisitorIDDate", cnnClearance)

    daClearance.SelectCommand.CommandType = CommandType.StoredProcedure

    Dim paramVisitorIDNo As New SqlParameter("@strVisitorIDNo", SqlDbType.VarChar, 13)

    Dim paramVisitEndDate As New SqlParameter("@dteVisitEndDate",

    SqlDbType.DateTime)

    daClearance.SelectCommand.Parameters.Add(paramVisitorIDNo)

    daClearance.SelectCommand.Parameters.Add(paramVisitEndDate)

    paramVisitorIDNo.Value = strVisitorIDNo

    paramVisitEndDate.Value = dteVisitEndDate

    cnnClearance.Open()

    daClearance.Fill(dsDetails)

    daClearance.SelectCommand = New SqlCommand("ProcGetBookingsByVisitorIDDate", cnnClearance)

    daClearance.SelectCommand.CommandType = CommandType.StoredProcedure

    Dim paramVisitorIDNo As New SqlParameter("@strVisitorIDNo", SqlDbType.VarChar, 13)

    Dim paramVisitEndDate As New SqlParameter("@dteVisitEndDate", SqlDbType.DateTime)

    daClearance.SelectCommand.Parameters.Add(paramVisitorIDNo)

    daClearance.SelectCommand.Parameters.Add(paramVisitEndDate)

    paramVisitorIDNo.Value = strVisitorIDNo

    paramVisitEndDate.Value = dteVisitEndDate

    cnnClearance.Open()

    daClearance.Fill(dsDetails)
     
    deena, Mar 2, 2005
    #1
    1. Advertising

  2. deena

    Michelle Guest

    Hi Deena,

    Are you disposing of the data adapter, connection, etc.? I dont see it
    in the code snippet you provided.

    take care,
    Michelle
     
    Michelle, Mar 3, 2005
    #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. deena

    SQL: "General network error"

    deena, Mar 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    459
    deena
    Mar 3, 2005
  2. Joerg Schrocke

    Timeout expired and General Network error

    Joerg Schrocke, Oct 25, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,269
  3. Joe Ross

    General Network Error - MS Stumped

    Joe Ross, Feb 26, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    572
    Joe Ross
    Mar 1, 2004
  4. =?Utf-8?B?S2FseWFu?=
    Replies:
    2
    Views:
    1,424
    =?Utf-8?B?S2FseWFu?=
    Jun 18, 2004
  5. Kal
    Replies:
    1
    Views:
    9,562
    Kevin Spencer
    Jun 21, 2004
Loading...

Share This Page