|
| |
|
|
Wendy P
Posts: 17 From: Timmins, Ontario, Canada Status: offline
|
Session variables and queries - 5/16/2001 13:38:00
I want to query my database using a session variable as the search parameter (frontpage wizard). My session variable is for a username. Can anyone tell me the query string I need to use to perform this search or how you use a session variable in a query?Other info. of note: table name: tblMF field name: txtLoginUser Thanks in advance Wendy
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Session variables and queries - 5/16/2001 15:15:00
What I've done (and has been suggested by others) is to use the session variable in the page linking to the results. IOW, something like this..Assuming you had Session("UserName") already set: Page 1 has a link to page 2 that is something like: <a href="page2.asp?txtLoginUser=<%=Session("Username")%>">Page 2</a> ...and Page 2 had the txtLoginUser as a search criteria in (I think) step 3 of the DRW. When you used the link, it should fill page 2 with the found data set. At least I have a very similar scenario and that's how I do it. I will give you a more detailed example of my code if you would like. I have tried and I don't believe you can access a session directly within the "Grey Code" (the DRW area). If anyone HAS accomplished this, I would be very interested in learning that...
[This message has been edited by rdouglass (edited 05-16-2001).]
|
|
|
|
Wendy P
Posts: 17 From: Timmins, Ontario, Canada Status: offline
|
RE: Session variables and queries - 5/17/2001 20:42:00
Thanks for your help with this. I suspected that I may have to pass the variable between pages, but couldn't find anything to confirm this. I suspect the problem is caused by the FrontPage web bot components. I ran into several problems that have been caused by the web bot component's interference in my asp code. I read an article entitled "Putting your pages on a diet" (or something like that) somewhere on this site and tried to reproduce my code using the example, but couldn't get it to work. I guess I'll have to learn more before I can muck with the web bot components. Thanks again for your help Wendy
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Session variables and queries - 5/17/2001 16:23:00
Send me a copy of a page if you like Wendy, Ill comment the parts that need changing for you to help you learn it !
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|