Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error msg

Status
Not open for further replies.

d1004

Programmer
May 9, 2002
78
US
I have an overflow error msg. Is anyone familiar with that.
 
Do you have an infinite loop, or unclosed objects? Sounds like a resource problem.
 
This is my while loop; however, I don't think I have an infinitely loop. Everything in the loop works fine until I added the following code line
yr35A910 = yr35A910/Q35GYrTotal

Here is my while loop codes, the code looks really mess up, but if you copy and paste it to Notepad, it is a lot better.

While (NOT objRS.EOF)

yr35A910 = 0
Q35GYrTotal = 0

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open strConnect

strSQL= "SELECT Count(tblSurveyRawData.Q35G) AS CountOfQ35G " & _
"FROM tblRep " & _
"INNER JOIN tblSurveyRawData ON tblRep.Rep_ID = tblSurveyRawData.Rep_ID " & _
"WHERE " & _
"tblSurveyRawData.[MONTH/YEAR] Between #" & BeginYrDate & "# AND #" & EndingDate & "# " & _
"AND [Rep_FirstName] & ' ' & [Rep_LastName] = '" & objRS("IndividualRep") & "' " & _
"AND (tblSurveyRawData.Q35G Is Not Null)"

set rs = objConn.Execute (strSQL)

Q35GYrTotal = rs("CountOfQ35G")

rs.close
objConn.close
set objConn = Nothing
set rs = Nothing



Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open strConnect


strSQL= "SELECT Count(tblSurveyRawData.Q35A) AS CountOfQ35A " & _
"FROM tblRep " & _
"INNER JOIN tblSurveyRawData ON tblRep.Rep_ID = tblSurveyRawData.Rep_ID " & _
"WHERE " & _
"tblSurveyRawData.[MONTH/YEAR] Between #" & BeginYrDate & "# AND #" & EndingDate & "# " & _
"AND [Rep_FirstName] & ' ' & [Rep_LastName] = '" & objRS("IndividualRep") & "' " & _
"AND (tblSurveyRawData.Q35A = 9 OR tblSurveyRawData.Q35A = 10)"

set rs = objConn.Execute (strSQL)

yr35A910 = rs("CountOfQ35A")

rs.close
objConn.close
set objConn = Nothing
set rs = Nothing

yr35A910 = yr35A910/Q35GYrTotal

Response.write &quot;<TR>&quot; & &quot;<TABLE BORDER = '3'>&quot; & &quot;<tr><td bgcolor = '#00FF99' width = '150'><font size = '3'>&quot; & objRS(&quot;IndividualRep&quot;) & &quot;</font>&quot; & &quot;<td width = '90' align = 'center'><font size = '3'>&quot; & yr35A910 & &quot;</font></table>&quot;


objRS.MoveNext
Wend
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top