I am having lots of trouble with deadlocking on my classic asp/sql server 2008 application. I am trying several things to optimize my query to avoid this. I am working on avoiding looping through the data and using rs.GetRows() instead. I also am researching other deadlock causes. I need some help on avoiding cursors. Please look at the following and let me know what I can do to further avoid deadlocks:
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT t.TeamsID, t.TeamName, t.Gender FROM Teams t INNER JOIN MeetTeams mt ON t.TeamsID = mt.TeamsID WHERE mt.MeetsID = " & lMeetID & " ORDER BY t.TeamName"
rs.Open sql, conn2, 1, 2
MeetTeams = rs.GetRows()
Set rs = Nothing