An exception of type 'Adodb.field:Either bof or eof is true

I have 2 asp pages. If  I click on a link on the first page I want it to carry the value of that column clicked which will be used in the second page. I then do a request.querystring to get this value in the second page.  The moment I run this code and set a breakpoint my code breaks on (set Rs = objcmd.Execute).
It does not return any record set and I get an error "An exception of type 'Adodb field:either bof or eof is true or the current record had been deleted. Meanwhile If i run this page by itself being the startup page, it comes up very well with all the records but by the time I start from the first page, I get this problem. Pls assist.

Here is the code for the second page:

option explicit
dim rs
dim strsql
dim objparam
dim objcmd
dim imore
dim imaxrecords,test
dim ivalue
set objcmd = server.CreateObject("adodb.command")
set rs = server.CreateObject("adodb.recordset")

'How many records per page do we want to show?
const iRecsPerPage = 15

'get the page number and column to sort by
dim isort,strsort,ipage, dd
isort = Request.QueryString("sort")
ipage = Request.QueryString("page")
ivalue = Request.QueryString("groupnum")
test = "'" & ivalue & "'"

'if these variable arent passed through the querystring assume we are on first page
if len(isort) = 0 or not isnumeric(isort) then isort = 1
if len(ipage) = 0 or not isnumeric(ipage) then ipage= 1

select case isort
      case 1:
      strsort  = "cbh_customer_number"
      case 2:
      strsort = "cbh_product_number"
      case 3:
      strsort = "period"

end select

'show the paged results
objcmd.ActiveConnection = application("DB_connectionString")
objcmd.CommandText = "ProcCurrentPeriod"
objcmd.CommandType = adcmdstoredproc

set objparam = objcmd.CreateParameter("page",adInteger ,adParamInput ,10,ipage)
objcmd.Parameters.append objparam

set objparam = objcmd.CreateParameter("recsperpage",adInteger ,adParamInput ,10,iRecsPerPage)
objcmd.Parameters.append objparam

set objparam = objcmd.CreateParameter("stringsort",advarchar ,adParamInput ,30,strsort)
objcmd.Parameters.append objparam

set objparam = objcmd.CreateParameter("value",advarchar ,adParamInput ,30,test)
objcmd.Parameters.append objparam

set Rs = objcmd.Execute   (****Rs has no value if I set a breakpoint here)

'do we have more records to display (another page?)

imore = rs("moreRecords")

*********Here is the first page where I am passing the value to the destination page
            Do While Not objrs.EOF
                  <td><a href="CurrentPeriodForm.asp?groupnum= <%= objrs("cdb_group_number")%>"><%= objrs("cdb_group_number")%></a></td>
                  <td><%= objrs("cdb_group_name")%></td>
                  <td><%= objrs("emp_name")%></td>
                  <td><a href="javascript:newwindow('ShowNotes.asp?cdbnotes=<%=objRS("cdb_group_number")%>')"> <%= objrs("cdb_note")%></a></td>
                  <td><a href="javascript:newwindow('ShowNotes.asp?analysisnotes=<%=objRS("cdb_group_number")%>')"> <%= objrs("analysis_note")%></a></td>


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

if not rs.eof then
  imore = rs("moreRecords")
  imore = 0
end if

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
One thing you need to be aware with commands is that the recordset returned is not always a recordset. (Don't ask me why)

Check your stored procedures for PRINT statements. (If you have query analyzer or something similar - run the stored procedure in that and look for messages) ADO can sometimes recognize printed statements as recordsets. (And it does it with no particular order or with any reasoning!)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.