Try this:
VB Code:
Dim conSopon As SqlConnection Dim sqdCmd As SqlCommand Dim rdrSQL As SqlDataReader Dim dsn As String = ConfigurationSettings.AppSettings("dsn") Dim cmbArray As New ArrayList() conSopon = New SqlConnection(dsn) sqdCmd = New SqlCommand("SELECT pIndex FROM Referer", conSopon) sqdCmd.Connection.Open() rdrSQL = sqdCmd.ExecuteReader Do While rdrSQL.Read cmbArray.Add(Trim(rdrSQL("pIndex"))) Loop rdrSQL.Close() sqdCmd.Connection.Close()
Are you invoking the "Close" method off the reader?




Reply With Quote