ElvisIncognito
IS-IT--Management
Below are two virtually identical sets of code. Both queries work properly and return the expected recordsets when using Enterprise Manager, but while the first set (lines currently commented out) return the records in my ASP page, the second set returns the following error message:
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/80a/matrix4.asp, line 22
I've noted Line 22 below...
' Set rsPlatforms = Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set rsTClist = Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
' qryOSnames="SELECT os, Short FROM platforms WHERE ProdVer='" & strProdVer & "' ORDER BY OSID DESC"
qryTCnames="SELECT testcasenumname FROM testcases WHERE Prodver = '" & Prodver & "' AND priority = '0' ORDER BY TestCaseNumName"
' rsPlatforms.Open qryOSnames, connTestMatrix, adOpenKeySet
rsTClist.Open qryTCnames, connTestMatrix, adOpenKeySet
' Dim arrOS()
Dim arrTC()
' ReDim arrOS(6,1)
ReDim arrTC(100)
' For OScount = 1 to intOScount
For TCcount = 1 to 100
' arrOS(OScount,0) = rsPlatforms("os"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
' arrOS(OScount,1) = rsPlatforms("Short"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
LINE 22 -> arrTC(TCcount) = rsTClist("testcasenumname"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
' Response.Write arrOS(OScount,0) & "<BR>"
Response.Write arrTC(TCcount) & "<BR>"
' rsPlatforms.MoveNext
rsTClist.MoveNext
' Next
Next
' rsPlatforms.Close
rsTClist.Close
' Set rsPlatforms= Nothing
Set rsTClist = Nothing
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/80a/matrix4.asp, line 22
I've noted Line 22 below...
' Set rsPlatforms = Server.CreateObject("ADODB.Recordset"
Set rsTClist = Server.CreateObject("ADODB.Recordset"
' qryOSnames="SELECT os, Short FROM platforms WHERE ProdVer='" & strProdVer & "' ORDER BY OSID DESC"
qryTCnames="SELECT testcasenumname FROM testcases WHERE Prodver = '" & Prodver & "' AND priority = '0' ORDER BY TestCaseNumName"
' rsPlatforms.Open qryOSnames, connTestMatrix, adOpenKeySet
rsTClist.Open qryTCnames, connTestMatrix, adOpenKeySet
' Dim arrOS()
Dim arrTC()
' ReDim arrOS(6,1)
ReDim arrTC(100)
' For OScount = 1 to intOScount
For TCcount = 1 to 100
' arrOS(OScount,0) = rsPlatforms("os"
' arrOS(OScount,1) = rsPlatforms("Short"
LINE 22 -> arrTC(TCcount) = rsTClist("testcasenumname"
' Response.Write arrOS(OScount,0) & "<BR>"
Response.Write arrTC(TCcount) & "<BR>"
' rsPlatforms.MoveNext
rsTClist.MoveNext
' Next
Next
' rsPlatforms.Close
rsTClist.Close
' Set rsPlatforms= Nothing
Set rsTClist = Nothing