Print Page | Close Window

Rs.movenext help

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1503
Printed Date: 29 March 2026 at 6:48am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Rs.movenext help
Posted By: l15aRd
Subject: Rs.movenext help
Date Posted: 31 March 2003 at 4:44am

I have a couple of ASP problems,

1. I have a DB, can display records, which is great, BUT at the start of each record I have a approved Yes/no field, and want to display only the records the have yes, so I triedsomething along the line of:

if x_aprvd = false then rs.movenext else (rest of record)

<table........

I know the above is not code correct (no delimiters and all, it's just off the top of my head), I have an existing end if, rs.movenext, loop command later on to loop through and display the records.

 

2. I've managed to add comments to another record (1 to many routeen)and what I would like to do is, on clicking to add a comment to a record, to add the record id to to a field on the comments table so I can then display the comments related to that record, I've managed to list the record ID's in a list, but have gone brain dead and can't think past this one...

 

Thanx in advance

 



-------------

http://www.drunkentechie.net - DrunkenTechie.net

You can logoff, but you can never leave



Replies:
Posted By: Scotty32
Date Posted: 31 March 2003 at 5:10am

umm didnt quite understand the no. 2 question

and for number 1, i aint sure cose ya said ya did it off the top of ya head, but is it cose it doesnt have quotes round the "false" ... like that?



Posted By: l15aRd
Date Posted: 31 March 2003 at 5:37am

the code line above isn't the exact script, it's just an example for quickness, but goes along those sort of lines, but it maybe completely different...it's just the way I was attempting to do it.... I can get the exact code 2night at home, I don't have it with me at work :(

I don't think that the testing value would have to be in "" as it's either Ture or false and not Text, as the text would be represented as "yes" or "no"



-------------

http://www.drunkentechie.net - DrunkenTechie.net

You can logoff, but you can never leave


Posted By: ultramods
Date Posted: 31 March 2003 at 7:52am

For question one why dont you just use select * from table where x_aprvd = True. This would be faster as it would return less results from the origional query, also you wouldnt have to use the if statement.



Posted By: l15aRd
Date Posted: 31 March 2003 at 8:07am
will try that 2night, and get back to ya...:)

-------------

http://www.drunkentechie.net - DrunkenTechie.net

You can logoff, but you can never leave


Posted By: l15aRd
Date Posted: 02 April 2003 at 4:56am

I used the string

Select * FROM [tblinks] WHERE [link_aprvd] = true

So thanks Ultramods for that,

now all I need to do is, I have a links table and a comments table, and want people to post comments about the links, I have a duplicate field on both tables called [Link_id], how do I set the [Link_id] on the comments table to the value of the record they want to comment on?? (abit like posting a comment on the forum)

Thanx again for any help given

 

 



-------------

http://www.drunkentechie.net - DrunkenTechie.net

You can logoff, but you can never leave


Posted By: ultramods
Date Posted: 02 April 2003 at 5:13am

For each link you could have a button called "comment". When they click on the button it go's to a page where they can comment on the link. The url for this page would have a queryString for the linkID.

For example. http://www.youdomain.co.uk/commentonLink.asp?linkID=2 - www.youdomain.co.uk/commentOnLink.asp?linkID=2

Let the users add there posts then enter all the details into your comments table including the linkID. ie rs("linkID") = linkID

http://www.youdomain.co.uk/commentonLink.asp?linkID -  



Posted By: l15aRd
Date Posted: 02 April 2003 at 5:32am
Once again you've come up trumps, will try it tonight, adn let you know, and then the fruits of my work will be available for all to see, a (links manager, with admin section and all) and if anyone wants it, I'll make a downloadable version, with out my site customisations

-------------

http://www.drunkentechie.net - DrunkenTechie.net

You can logoff, but you can never leave



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net