Using the follwing code I get the error message:<BR>Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index <BR>and the problem points to the line <BR>'myConnection.Open()'<BR><BR>It is very random, occuring on different pages at different locations, but always points to this function<BR><BR>Public Overloads Shared Function daReader(cnn,sproc) as SqlDataReader<BR>Dim MyConnection As SqlConnection<BR>IF cnn = "LS" THEN<BR> myConnection = New SQLConnection(ConfigurationSettings.AppSettings("cnnString"))<BR>ELSE<BR> myConnection = New SQLConnection(ConfigurationSettings.AppSettings("cnnTGString"))<BR>END IF<BR>Dim MyCommand As SqlCommand = New SqlCommand(sproc, MyConnection)<BR>myConnection.Open()<BR>RETURN myCommand.ExecuteReader(CommandBehavior.CloseConne ction)<BR>End Function<BR><BR>T...that the problem is actually in the query; the sproc.<BR><BR>Because, of course, the Database can't "see" that query until the Open occurs, at which point it then figures out that something is wrong?<BR><BR>It does not happen on just one stored proc or sql statement. it happens randomly throughout the site.( on a side note: we just upgraded from beta2 to release on our dev box, and this is when the problems started. We recompiled all our dll's using the release version and then we started getting this error), before this we never got this error associated with data access.<BR><BR>T<BR><BR><BR>T