G
Guest
We are intermitantly receiving this error on our website.
ExecuteReader requires an open and available Connection. The connection's
current state is connecting. Following is the code from the Load event
of the aspx page. The last line is where the error occurs. Does anyone
have any
ideas what is causing this?
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim MyDA As New SqlDataAdapter
Dim MyDT As New DataTable
OpenNCConn()
MyDA = New SqlDataAdapter
MyDT = New DataTable
MyDA.SelectCommand = New SqlCommand("Select ELMAcctEmail from
TFT.dbo.TFTELMConfig NOLOCK where Acct_Nbr = '" & _
Session("Acct_Nbr") & "'", NC_Conn)
MyDA.Fill(MyDT)
If (MyDT.Rows.Count > 0) Then
Session("hasELM") = True
If Not IsBlank(MyDT.Rows(0).Item(0)) Then
Session("ELMAcctEmail") = Trim(MyDT.Rows(0).Item(0))
Else
Session("ELMAcctEmail") = ""
End If
Else
Session("hasELM") = False
End If
NC_Conn.Close()
OpenNCConn()
MyDA = Nothing
MyDT = Nothing
GC.Collect()
MyDA = New SqlDataAdapter
MyDT = New DataTable
MyDA.SelectCommand = New SqlCommand("Select
HoldCalls,DBMonthlyFee,CallStatusMenu,BusyNAMessage,PlayResMenu," & _
"PlayAcctResMenu,RecordAll,Allow_Markets,Reverse,BFIAfterHours,DBExtendedData,IdleAgentHold,SmartAgentRouting
from TFT.dbo.TFTAcctCfg NOLOCK where Acct_Nbr = '" & _
Session("Acct_Nbr") & "'", NC_Conn)
MyDA.SelectCommand.CommandTimeout = 0
MyDA.Fill(MyDT)
ExecuteReader requires an open and available Connection. The connection's
current state is connecting. Following is the code from the Load event
of the aspx page. The last line is where the error occurs. Does anyone
have any
ideas what is causing this?
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim MyDA As New SqlDataAdapter
Dim MyDT As New DataTable
OpenNCConn()
MyDA = New SqlDataAdapter
MyDT = New DataTable
MyDA.SelectCommand = New SqlCommand("Select ELMAcctEmail from
TFT.dbo.TFTELMConfig NOLOCK where Acct_Nbr = '" & _
Session("Acct_Nbr") & "'", NC_Conn)
MyDA.Fill(MyDT)
If (MyDT.Rows.Count > 0) Then
Session("hasELM") = True
If Not IsBlank(MyDT.Rows(0).Item(0)) Then
Session("ELMAcctEmail") = Trim(MyDT.Rows(0).Item(0))
Else
Session("ELMAcctEmail") = ""
End If
Else
Session("hasELM") = False
End If
NC_Conn.Close()
OpenNCConn()
MyDA = Nothing
MyDT = Nothing
GC.Collect()
MyDA = New SqlDataAdapter
MyDT = New DataTable
MyDA.SelectCommand = New SqlCommand("Select
HoldCalls,DBMonthlyFee,CallStatusMenu,BusyNAMessage,PlayResMenu," & _
"PlayAcctResMenu,RecordAll,Allow_Markets,Reverse,BFIAfterHours,DBExtendedData,IdleAgentHold,SmartAgentRouting
from TFT.dbo.TFTAcctCfg NOLOCK where Acct_Nbr = '" & _
Session("Acct_Nbr") & "'", NC_Conn)
MyDA.SelectCommand.CommandTimeout = 0
MyDA.Fill(MyDT)