Bob Schneider
asked on
ASP GetRows Error
I am getting this error: Bookmark is invalid.
On this line: IndRslts = rs.GetRows(iNumRcds, iFirstRcd)
It works fine if I take the parameters out. iNumRcds = 75 and iFirstRcd = 1 in this case.
Thanks!
On this line: IndRslts = rs.GetRows(iNumRcds, iFirstRcd)
It works fine if I take the parameters out. iNumRcds = 75 and iFirstRcd = 1 in this case.
Thanks!
Are there 75 records in the recordset?
ASKER
There are 81
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Easy = way
Damn auto correct :-)
Damn auto correct :-)
ASKER
sql = "SELECT pr.Bib, p.FirstName, p.LastName, p.Gender, pr.Age, ir.ChipTime, ir.FnlTime, ir.ChipStart, p.City, p.St "
sql = sql & "FROM Participant p INNER JOIN IndResults ir ON p.ParticipantID = ir.ParticipantID "
sql = sql & "INNER JOIN PartRace pr ON pr.ParticipantID = p.ParticipantID "
sql = sql & "INNER JOIN RaceData rd ON rd.RaceID = pr.RaceID AND rd.RaceID = ir.RaceID "
sql = sql & "WHERE ir.RaceID = " & lRaceID & " AND ir.FnlTime IS NOT NULL ORDER BY ir.ChipTime"
Else
sql = "SELECT pr.Bib, p.FirstName, p.LastName, p.Gender, pr.Age, ir.ChipTime, ir.FnlTime, ir.ChipStart, p.City, p.St "
sql = sql & "FROM Participant p INNER JOIN IndResults ir ON p.ParticipantID = ir.ParticipantID "
sql = sql & "INNER JOIN PartRace pr ON pr.ParticipantID = p.ParticipantID "
sql = sql & "INNER JOIN RaceData rd ON rd.RaceID = pr.RaceID AND rd.RaceID = ir.RaceID "
sql = sql & "WHERE ir.RaceID = " & lRaceID & " AND p.Gender = '" & sGender & "' AND ir.FnlTime IS NOT NULL ORDER BY ir.ChipTime"
End If
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 1, 2
IndRslts = rs.GetRows(iNumRcds, iFirstRcd)
rs.Close
Set rs = Nothing
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I can do that but the problem with that is if there are no records it will throw an error, correct?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Here's what I got: Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Where do I put that file and how do I reference it in my code?
ASKER
Ok so how can I make this work? I really want to be able to tell the db where to start and how many records to et.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I can do that but I am trying to minimize the resource drain and I figured I could just tell it where to start and how many records to get and that would be quicker. No?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got it. I works if I just tell it how many records to get. I built the start point into the query.
ASKER
Great discussion...very informative.