Greeting fols, i have tracked down, thru stress testing, this piece of code that is giving performance issues, I was wondering what suggestion can be given to make it more robust, thanks!
Code:
Set objProdRS = objConn.Execute(strSQL)
' 2 May 2004, Moving objProdRS into another data structure so as to
' not have 2 record sets open at the same time. (getting production performance issues)
Dim arrProduct()
Dim strGetProductDetailsCode
strGetProductDetailsCode = ""
ReDim arrProduct(intProductCount*2)
intProductCount = 0
Do Until objProdRS.EOF
arrProduct(intProductCount) = objProdRS("ProductID")
arrProduct(intProductCount + 1) = objProdRS("ProductName")
strGetProductDetailsCode = strGetProductDetailsCode & "case """ & arrProduct(intProductCount) & """:" & vbNewLine
strGetProductDetailsCode = strGetProductDetailsCode & " strResult = """ & Replace(arrProduct(intProductCount + 1),"""","'") & "<~>" & objProdRS("MaxGuest") & """; break;"
intProductCount = intProductCount + 2
objProdRS.moveNext
Loop
objProdRS.Close
Set objProdRS = Nothing