473,578 Members | 2,919 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

show details of first record

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.redire ct 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
3 1452
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**@whydoyoun eedtosendspam.n ot> wrote in message
news:%2******** ********@TK2MSF TNGP15.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.redire ct 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
As I loop through the recordset, I have these lines of code:

......
do until rswl.eof
if request.queryst ring("rid") = "" then
response.redire ct("worklist.as p?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******** ********@TK2MSF TNGP09.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**@whydoyoun eedtosendspam.n ot> wrote in message
news:%2******** ********@TK2MSF TNGP15.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.redire ct 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
Well, this is inefficient if request.queryti ng("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.Redire ct "worklist.asp?r id=" & 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**@whydoyoun eedtosendspam.n ot> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
As I loop through the recordset, I have these lines of code:

.....
do until rswl.eof
if request.queryst ring("rid") = "" then
response.redire ct("worklist.as p?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******** ********@TK2MSF TNGP09.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**@whydoyoun eedtosendspam.n ot> wrote in message
news:%2******** ********@TK2MSF TNGP15.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.redire ct 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1275
by: Ray | last post by:
I need to create a report showing the candidate, class, score of judge 1, 2, 3, 4. Currently, I manage to obtain the result of candidate and score of judge 1, 2, 3 and 4 but not the class. I would appreciate any suggestions to accomplish this job. I have a table containing the details of candidate, class, score of judge 1, 2, 3 and 4. Each...
15
1913
by: Joachim | last post by:
Hi, Als a beginner, I am looking for a way to show records My code is Private sub Connection( Dim odbconn_Pro As OleDbConnectio Dim odbcomm_Pro As OleDbComman Dim odbdare_Pro As OleDbDataReade Dim DataFile as Strin DataFile = "H:\Production\Prod.mdb
1
6634
by: Paul Fairless | last post by:
Could someone please explain how I overload the Show() method of a form? Suppose I select a record from a datagrid on Form1, then I want to show the details of the selected record by opening Form2 using say the CustomerID as an 'argument' to the Show method. So, in Form1 I would have code such as: Sub GetSelectedRecord()...
1
2537
by: Galka | last post by:
Hello I have a form to enter names and some other personal information. When a name is entered, it is checked against existing records: maybe, such name was entered before? If yes, user is notified and asked, would you like to see the previous record? If user answers yes, form on the screen is scrolled to the record with the same name. All...
1
1225
by: Coty | last post by:
Here's the problem I'm having. I write a record to backend database and upon the postback my record set is not showing the record I just added. If I close the page totally and reopen the page it will show up, or if I add a second record the first will show upon the postback of the page but the second one won't. My dataset is loaded...
3
4077
by: chrisse_2 | last post by:
Hey, In my database i have images, linked to the database, corresponding to different records. I am having trouble making them show in the report. At the moment i can only get the one picture to show everytime. There is a catch to the situation; the report is constructed in such a way in that it doesn't have anything in the record source...
4
1814
by: J | last post by:
I am editing a pre-existing view. This view is already bringing data from 40+ tables so I am to modify it without screwing with anything else that is already in there. I need to (left) join it with a new table that lists deposits and the dates they are due. What I need is to print, for each record in the view, the due date for the next...
0
3440
by: Reinhard | last post by:
Hi, Need some directions on Ajax, UpdatePanel and Gridview to achive the following: I like to show a Gridview with Data ONLY if the user is interested in Details, but without a full page reload! If the page loads, only a summary (eg. COUNT of recs) should be displayed
0
2190
by: peter.c.bradley | last post by:
Hi folks, I have an Access report that has an unbound text box in the details section. The report also includes the standard headers and footers. The details section is populated by a query executed during the “Report_Open” event. Depending on the query, the details section can have 1 or more records and each record is a text string of...
0
7779
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8291
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7874
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3786
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3801
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2293
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1114
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.