Print Page | Close Window

Pass Variable to 2nd page and display

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=3645
Printed Date: 29 March 2026 at 11:56pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Pass Variable to 2nd page and display
Posted By: jrockfl
Subject: Pass Variable to 2nd page and display
Date Posted: 18 June 2003 at 1:54pm

page 1 has links like this...

full_article.asp?resourceid=5
full_article.asp?resourceid=20

etc..etc..( this is displayed dynamically from the db)

page 2 will display all the columns in the db for that particular resourceid

I need help with the SQL statement
strSQL = "SELECT * FROM rockenbach WHERE resourceid = " & resourceid

 

 




Replies:
Posted By: Gullanian
Date Posted: 18 June 2003 at 5:50pm
strSQL = "SELECT * FROM rockenbach WHERE resourceid = " & cInt(Request.querystring("resourceid"))


Posted By: jrockfl
Date Posted: 18 June 2003 at 6:15pm
Yes, that is what I was looking for. Thank you!


Posted By: Gullanian
Date Posted: 18 June 2003 at 6:47pm
Youd probably want to use cLng() rather than cInt()


Posted By: jrockfl
Date Posted: 18 June 2003 at 6:59pm

What do both of those mean? cLng and Cint ?

When would you use either of the 2?



Posted By: Gullanian
Date Posted: 19 June 2003 at 3:12am
cInt turns the value into a datatype called Integer, which can range from -128 to 127, whilst cLng converts the value into a datatype called long, which can store much larger numbers.  If you use cInt and then pass a number through which is out of range, you will get an overflow error.



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