Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

  • Thread starter Thread starter Raymond Chiu
  • Start date Start date
R

Raymond Chiu

Guest
Dear all,

I have the store procedure which needs to run around 8-10 minutes.

I have set the sqlConnection to have connection timeout to be 1500. But still throw below messages when dataadapter fill.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Dim connStr As String = ConnectionString & ";Connection Timeout=1500"
Dim conn As New SqlConnection(connStr)
Dim cmd2 As New SqlCommand("RPTDurationSummaryReport", conn)
cmd2.CommandType = CommandType.StoredProcedure
cmd2.Parameters.Add("@FROM_DATE", FromDate)
cmd2.Parameters.Add("@TO_DATE", ToDate)
cmd2.Parameters.Add("@USER", p_stringUsername)

Dim adp2 As New SqlDataAdapter(cmd2)

adp2.Fill(ds, "RPTDurationSummaryReport") // THROW EXCEPTION

Continue reading...
 
Back
Top