By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,669 Members | 2,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,669 IT Pros & Developers. It's quick & easy.

show details of first record

P: n/a
I have a list of requests that I'm displaying. The client wants to be able
to display the details of the FIRST request as the page loads.

Right now, as I loop through the recordset, I'm checking the querystring for
"rid", and if rid = "" then I do a response.redirect to the page adding the
rid value to the querystring from the recordset.

I'm thinking this is not very effecient, but I can't figure out anything
better.. anyone have a good solution to show the details of the first item
on the list?

Thanks!
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I don't understand what the "rid" has to do with what you're trying to do.
Can you show us what you're doing somehow?

Ray at work

"Bryan Harrington" <ne**@whydoyouneedtosendspam.not> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I have a list of requests that I'm displaying. The client wants to be able to display the details of the FIRST request as the page loads.

Right now, as I loop through the recordset, I'm checking the querystring for "rid", and if rid = "" then I do a response.redirect to the page adding the rid value to the querystring from the recordset.

I'm thinking this is not very effecient, but I can't figure out anything
better.. anyone have a good solution to show the details of the first item
on the list?

Thanks!

Jul 22 '05 #2

P: n/a
As I loop through the recordset, I have these lines of code:

......
do until rswl.eof
if request.querystring("rid") = "" then
response.redirect("worklist.asp?rid=" & rswl("reject_id") & "&Page=" &
iCurrentPage )
end if
......
etc..

I need to grab the first item on the list and show it's details, and the
above works, but just doesn't seem effecient to me, but I don't really want
to do a select top 1 (because the sql is pretty big, and pretty dynamic
(based on user login)), and then open the full recordset again.. that
doesn't seem effecient either.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
I don't understand what the "rid" has to do with what you're trying to do.
Can you show us what you're doing somehow?

Ray at work

"Bryan Harrington" <ne**@whydoyouneedtosendspam.not> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I have a list of requests that I'm displaying. The client wants to be

able
to display the details of the FIRST request as the page loads.

Right now, as I loop through the recordset, I'm checking the querystring

for
"rid", and if rid = "" then I do a response.redirect to the page adding

the
rid value to the querystring from the recordset.

I'm thinking this is not very effecient, but I can't figure out anything
better.. anyone have a good solution to show the details of the first item on the list?

Thanks!


Jul 22 '05 #3

P: n/a
Well, this is inefficient if request.queryting("rid") is empty, since
that'll be evaluated every time, and you'll loop through the recordset for
nothing.

What is rid? Why are you passing a value in a querystring that you aren't
using? Is that an ID number? Is that value not already known and available
elsewhere in your code?

Response.Redirect "worklist.asp?rid=" & rswl("reject_id") & "&page=" &
iCurrentPage

You know it's going to be the first record in the recordset anyway, right?

Ray at work

"Bryan Harrington" <ne**@whydoyouneedtosendspam.not> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
As I loop through the recordset, I have these lines of code:

.....
do until rswl.eof
if request.querystring("rid") = "" then
response.redirect("worklist.asp?rid=" & rswl("reject_id") & "&Page=" &
iCurrentPage )
end if
.....
etc..

I need to grab the first item on the list and show it's details, and the
above works, but just doesn't seem effecient to me, but I don't really want to do a select top 1 (because the sql is pretty big, and pretty dynamic
(based on user login)), and then open the full recordset again.. that
doesn't seem effecient either.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
I don't understand what the "rid" has to do with what you're trying to do.
Can you show us what you're doing somehow?

Ray at work

"Bryan Harrington" <ne**@whydoyouneedtosendspam.not> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I have a list of requests that I'm displaying. The client wants to be

able
to display the details of the FIRST request as the page loads.

Right now, as I loop through the recordset, I'm checking the querystring
for
"rid", and if rid = "" then I do a response.redirect to the page
adding the
rid value to the querystring from the recordset.

I'm thinking this is not very effecient, but I can't figure out

anything better.. anyone have a good solution to show the details of the first

item on the list?

Thanks!



Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.